[R] SVD with positivity constraints

2004-07-27 Thread Molins, Jordi
Hello, I have a matrix equation, Ax=b, that I need to solve for x. x should be a vector of positive numbers (between 0 and 1). A is not a square matrix in general. This lead me to using the SVD. However, using the SVD gives me positive and negative numbers, as well. I have some constraints

[R] Unable to open html help pages

2004-07-27 Thread Martin McCabe
I recently upgraded R to 1.9.1 for Mac from 1.8.1. I am not able to open the help pages online but get the message If /usr/bin/open is already running, it is *not* restarted, and you must switch to its window. Otherwise, be patient ... However, nothing happens. There are not any other

[R] Underline in expression().

2004-07-27 Thread John Janmaat
Hello All, Is there an analogue to \underbar or the AMS math \underline in graphical math expressions? Thanks, John. -- = Dr. John Janmaat Department of Economics Acadia University Wolfville, Nova Scotia, Canada

Re: [R] SVD with positivity constraints

2004-07-27 Thread Prof Brian Ripley
If A is not square, which dimension is larger? There will most likely be either no solution or an infinity of solutions. If the latter, I think you are using the Moore-Penrose inverse (depends exactly how you use the SVD), that is the shortest solution, but the SVD will give you the whole

RE: [R] SVD with positivity constraints

2004-07-27 Thread Molins, Jordi
Thank you to Prof Brian Ripley and to Ken Knoblauch for your replies. I should explain a little bit more about the problem at hand: in principle, the matrix can have more rows than columns or the other way around. However, I always could include in an artificial way more equations, such that

Recall: [R] SVD with positivity constraints

2004-07-27 Thread Molins, Jordi
The sender would like to recall the message, [R] SVD with positivity constraints. The information contained herein is confidential and is inte...{{dropped}} __ [EMAIL

RE: [R] SVD with positivity constraints

2004-07-27 Thread Molins, Jordi
Thank you to Prof Brian Ripley and to Ken Knoblauch for your fast replies. I should explain a little bit more about the problem at hand: in principle, the matrix can have more rows than columns or the other way around. However, I always could include in an artificial way more equations, such that

[R] Display on Windows console from script

2004-07-27 Thread Laetitia Marisa
Hello, When I launch a script under windows it does not display sequentially my cat calls or maybe the console is not refreshed at every line of my script. For instance with that code cat(\n\n== IMPORT DATA FROM FILE ===\n\n) fileschosen -

Re: [R] Display on Windows console from script

2004-07-27 Thread Prof Brian Ripley
Please consult the rw-FAQ, specifically Q6.3 whose subject looks a perfect fit for your question (and whose answer contains the answer). On Tue, 27 Jul 2004, Laetitia Marisa wrote: When I launch a script under windows it does not display sequentially my cat calls or maybe the console is not

[R] library manual: documentation of funcs not alphabetically ordered

2004-07-27 Thread Robin Hankin
Hello everybody I'm putting finishing touches to a library, and have noticed that the .dvi file that R CMD check creates does not sort the functions in alphabetical order. I find this odd because I used the tidy routines in section 3.1 of the R-exts manual, which produce R code in which the

RE: [R] SVD with positivity constraints

2004-07-27 Thread Molins, Jordi
Hello, what I wrote below is nonsense: if the matrix has more equations than unknowns, it makes no sense considering the general space of solutions. Sorry for that. Another consideration: could somebody give me an opinion about the following procedure? the simplex algorithm maximizes z=a00x0

Re: [R] library manual: documentation of funcs not alphabetically ordered

2004-07-27 Thread Prof Brian Ripley
On Tue, 27 Jul 2004, Robin Hankin wrote: Hello everybody I'm putting finishing touches to a library, package? and have noticed that the .dvi file that R CMD check creates does not sort the functions in alphabetical order. It is not designed to, merely to check that the files can be

RE: [R] Read SPSS data (*.sav) in R 1.8.0 (ok) and R1.9.1(error)

2004-07-27 Thread Sara Drew
I have had the same problem (or at least get the same error msg) using the spss.get() function from Hmisc using R1.9.1 to read an SPSS file. I think read.spss() from foreign package still works though. Have not tried spss.get() with any other version of R. -Original Message- From: [EMAIL

[R] list problem

2004-07-27 Thread Luis Rideau Cruz
Hi all, I have the folowing frame(there are more columns than shown), 1 2 34 5 Year Total TusWhi Norw 1994 1.00 1830 0 355 1995 1.00 0 00 1995 1.00 0

[R] test for difference between non-independent correlations

2004-07-27 Thread Avril Coghlan
Hello, I am wondering whether there is a way to test whether two non-independent correlation coefficients are significantly different, in R? I have an experimentally measure variable Y, and two different variables X1, and X2, which are predictions of Y that were predicted using two different

Re: [R] test for difference between non-independent correlations

2004-07-27 Thread Jonathan Baron
On 07/27/04 13:35, Avril Coghlan wrote: Hello, I am wondering whether there is a way to test whether two non-independent correlation coefficients are significantly different, in R? About 20 years ago I asked the same question (without the R), found Steiger's paper (below) and wrote this BASIC

Re: [R] list problem

2004-07-27 Thread Dimitris Rizopoulos
Hi Luis, maybe there are better ways but you could try something like this, n - length(frame) lapply(split(frame, frame$Year), function(x, n.){ res - numeric(n.-2) for(i in 3:n.) res[i-2] - sum(x$Total[x[,i]0.]) res }, n.=n) I hope this helps. Best, Dimitris Dimitris Rizopoulos

Re: [R] lattice / pdf bug ?

2004-07-27 Thread Dirk Eddelbuettel
On Mon, Jul 26, 2004 at 06:50:13PM -0500, Deepayan Sarkar wrote: On Monday 26 July 2004 18:17, Dirk Eddelbuettel wrote: I've been scrathing my head over this one. Suppose I have a data.frame which maps to a 'n x k' lattice, and that one of those cells is empty. An artificial example is

Re: [R] X11 device problem on linux: 100% cpu usage

2004-07-27 Thread David Whiting
--- Barry Rowlingson [EMAIL PROTECTED] wrote: David Whiting wrote: I'm using R 1.9.1 (patched, 5th July) on linux (Mandrake 9.2) and am having a problem with the X11() device. Trying to plot(1:10) results in my CPU going to 100% I'm not sure where to start with identifying the

[R] Help R - SNOW package...correct indexation syntax??

2004-07-27 Thread Ron Piccinini
Hello! I am trying to apply estimators at various data lengths (data is resident on diferent nodes of a beowulf cluster) in order to save computation time. On one side, suppose that: x - clusterCall(cl,runif,10) (i.e. 100,000 random numbers on each node) then the first say 100 numbers of

Re: [R] covariate selection in cox model (counting process)

2004-07-27 Thread Thomas Lumley
On Tue, 27 Jul 2004, Mayeul KAUFFMANN wrote: Thank you a lot for your time and your answer, Thomas. Like all good answers, it raised new questions for me ;-) In the case of recurrent events coxph() is not using maximum likelihood or even maximum partial likelihood. It is maximising the

[R] computing differences between consecutive vector elements

2004-07-27 Thread Dewez Thomas
Dear R-users, I am a newbie to R so please excuse this naive question for which I couldn't seem to find online answers. I have this data frame containing a series of locations through time (x,y,z,t). I would like to compute the difference in x, y and z between t-1 and t. Sounds easy enough, but

RE: [R] computing differences between consecutive vector elements

2004-07-27 Thread Liaw, Andy
Not exactly sure what you want, but seems like you can sort the data frame by `t', then do diff() on the x, y, and z columns. Andy From: Dewez Thomas Dear R-users, I am a newbie to R so please excuse this naive question for which I couldn't seem to find online answers. I have this

RE: [R] computing differences between consecutive vectorelements

2004-07-27 Thread Dewez Thomas
well, sure diff() does it thanks alot Thomas -Message d'origine- De: Liaw, Andy [mailto:[EMAIL PROTECTED] Date: mardi 27 juillet 2004 16:50 À: 'Dewez Thomas'; '[EMAIL PROTECTED]' Objet: RE: [R] computing differences between consecutive vectorelements Not exactly sure what you

Re: [R] list problem

2004-07-27 Thread Berton Gunter
This is also the sort of thing tapply() does well: (note that by() and aggregate() are just fancy wrappers for tapply). e.g. tus-tapply(yourframe$Total,list(yourframe$Year,yourframe$Tus0),sum) (One could nest this within an lapply() to loop over the different columns of your frame). Note that

Re: [R] Underline in expression().

2004-07-27 Thread Sundar Dorai-Raj
John Janmaat wrote: Hello All, Is there an analogue to \underbar or the AMS math \underline in graphical math expressions? Thanks, John. Uwe Ligges posted a solution a couple of years ago. I don't know if there is anything built in yet. ?plotmath does not seem to say anything about

[R] lattice.device in loop

2004-07-27 Thread Matt Pocernich
Hi, I am having problems creating a pdf file of a lattice graph. Things work fine for a single image, but I am having trouble using the commands in a loop. To illustrate by example This works with both ps and pdf files. dat = list(x= 1:10, y = 1:10) trellis.device(postscript, file =

Re: [R] lattice.device in loop

2004-07-27 Thread Sundar Dorai-Raj
Matt Pocernich wrote: Hi, I am having problems creating a pdf file of a lattice graph. Things work fine for a single image, but I am having trouble using the commands in a loop. To illustrate by example This works with both ps and pdf files. dat = list(x= 1:10, y = 1:10)

Re: [R] computing differences between consecutive vector elements

2004-07-27 Thread Uwe Ligges
Dewez Thomas wrote: Dear R-users, I am a newbie to R so please excuse this naive question for which I couldn't seem to find online answers. I have this data frame containing a series of locations through time (x,y,z,t). I would like to compute the difference in x, y and z between t-1 and t. Sounds

[R] Integration with adapt

2004-07-27 Thread Rodrigo Drummond
Hi all, I need to calculate a multidimensional integration on R. I am using the command “adapt” (from library adapt), although sometimes I get the following error message: Ifail=2, lenwrk was too small. -- fix adapt() ! Check the returned relerr! in: adapt(3, linf, lsup, functn = Integrando1)

[R] ghyper package

2004-07-27 Thread Román Padilla Lizbeth
Hello I am searching ghyper package (generalized hypergeometric distributions). Does anyone can send it to me? Regards from Mexico Lizbeth Román [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list

Re: [R] ghyper package

2004-07-27 Thread Bob Wheeler
It is in SuppDists. Román Padilla Lizbeth wrote: Hello I am searching ghyper package (generalized hypergeometric distributions). Does anyone can send it to me? Regards from Mexico Lizbeth Román [[alternative HTML version deleted]] __ [EMAIL

Re: [R] ghyper package

2004-07-27 Thread Marc Schwartz
On Tue, 2004-07-27 at 13:54, Romn Padilla Lizbeth wrote: Hello I am searching ghyper package (generalized hypergeometric distributions). Does anyone can send it to me? Regards from Mexico Lizbeth Romn You will find that _function_ in Bob Wheeler's SuppDists package on CRAN:

Re: [R] ghyper package

2004-07-27 Thread Sundar Dorai-Raj
Román Padilla Lizbeth wrote: Hello I am searching ghyper package (generalized hypergeometric distributions). Does anyone can send it to me? Regards from Mexico Lizbeth Román [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing

[R] BIC vz SBIC vz SIC

2004-07-27 Thread Mayeul KAUFFMANN
2) question: alwasy on BIC, from stepAIC() function help page I found a k=log(n) argument to add. Since that produce an error, is there a way to found the n dinamically? stepAIC(mydata.logistic, trace = F, k=log(nrow(mydata))) -- Daniele Medri (It was 3 weeks ago but I was just myself faced

[R] Reading and treating multiple files....

2004-07-27 Thread Mayeul KAUFFMANN
I will get - in a few days- a set of separate files(one for each records~80'000 files pro year) named key.txt in which other info (measurements of pressure and velocity at each second ) is stocked; typically each one of this separate files will hold something between 200 and 1500

Re: [R] interpreting profiling output

2004-07-27 Thread Kasper Daniel Hansen
On Tue, Jul 27, 2004 at 09:12:56AM +0200, Peter Dalgaard wrote: [What did ess-help have to do with this?? Snipped from CC:] This happens when posting in a hurry using a new mail client. Sorry. See below btw. Kasper Daniel Hansen [EMAIL PROTECTED] writes: Thanks to both of you for

RE: [R] interpreting profiling output

2004-07-27 Thread Liaw, Andy
From: Kasper Daniel Hansen On Tue, Jul 27, 2004 at 09:12:56AM +0200, Peter Dalgaard wrote: Hmm... You're using summaryRprof(), obviously. Do the results match up with what you get from R CMD Rprof? Looking at the source for summaryRprof, I see that it uses this construction

[R] Re: R-help Digest, Vol 17, Issue 25

2004-07-27 Thread Ross Henderson
hello, I'm trying to use R to take an image matrix and paint it into a tcltk canvas. I'm using R-1.9.0 within ess-5.2.0 on a linux machine running the 2.4.30-31.9smp kernel. I'm using the ActiveTcl8.4.6.1-linux-ix86 tcltk libraries. When I run the following comands, however, I get an R

[R] DESCRIPTION.in

2004-07-27 Thread Kevin Bartz
Hello R world! I'm building a bundle of four packages, but I don't always want to build the whole bundle. Usually I just want to tweak one function in one of the packages and rebuild just that package. As such, I have DESCRIPTION and DESCRIPTION.in files sitting in all the package folders.

Re: [R] Re: R-help Digest, Vol 17, Issue 25

2004-07-27 Thread Peter Dalgaard
Ross Henderson [EMAIL PROTECTED] writes: hello, I'm trying to use R to take an image matrix and paint it into a tcltk canvas. I'm using R-1.9.0 within ess-5.2.0 on a linux machine running the 2.4.30-31.9smp kernel. I'm using the ActiveTcl8.4.6.1-linux-ix86 tcltk libraries. When I

Re: [R] interpreting profiling output

2004-07-27 Thread Kasper Daniel Hansen
On Tue, Jul 27, 2004 at 06:17:10PM -0400, Liaw, Andy wrote: From: Kasper Daniel Hansen On Tue, Jul 27, 2004 at 09:12:56AM +0200, Peter Dalgaard wrote: Hmm... You're using summaryRprof(), obviously. Do the results match up with what you get from R CMD Rprof? Looking at the

[R] Another big data size problem

2004-07-27 Thread Federico Gherardini
Hi all, I'm trying to read a 1220 * 2 table in R but I'm having lot of problems. Basically what it happens is that R.bin starts eating all my memory until it gets about 90%. At that point it locks itself in a uninterruptible sleep status (at least that's what top says) where it just sits

[R] Best way to store negative indexes

2004-07-27 Thread StephaneDemurget
Hi, I'm trying to figure out how to properly construct a graph of frequencies of a difference between 2 values, that is | i | - | j |. I'd like to know the best way to store the actual data because of course doing my_vector[i -j] will not work because the index could be negative. I know there's

Re: [R] Best way to store negative indexes

2004-07-27 Thread Adaikalavan Ramasamy
Do you mean something like abs( my_vector[i] - my_vector[j] ) See if reading help(subset) helps. On Wed, 2004-07-28 at 01:42, StephaneDemurget wrote: Hi, I'm trying to figure out how to properly construct a graph of frequencies of a difference between 2 values, that is | i | - | j |.

[R] a question about using nlme

2004-07-27 Thread Lijuan Wang
Hi, I am using Splus to run a multiphase mixed-effects model. The quations of the models are as below: gf[ij]=b0[i]+b1[i]*age[ij]+b2[i]*max(0,(age[ij]-tau[i]))^2+e[ij] b0[i]=b00+e[i0] b1[i]=b10+e[i1] b2[i]=b20+e[i2] tau[i]=tau+e[i3] i: 1,2,...,100 subjects j: 1,2,...,6 occasions The main scripts

RE: [R] Best way to store negative indexes

2004-07-27 Thread Liaw, Andy
Can you give a simple example of what you are trying to do? Would the following help? x - sample(10) diffMat - outer(x, x, -) x [1] 1 10 5 8 9 6 3 2 4 7 diffMat [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]0 -9 -4 -7 -8 -5 -2 -1 -3-6 [2,]

[R] covariate selection in cox model (counting process)

2004-07-27 Thread Mayeul KAUFFMANN
No, I mean recurrent events. With counting process notation but no recurrent revents the partial likelihood is still valid, and the approach of treating it as a real likelihood for AIC (and presumably BIC) makes sense. Roughly speaking, you can't tell there is dependence until you see multiple

Re: [R] a question about using nlme

2004-07-27 Thread A.J. Rossini
Lijuan Wang [EMAIL PROTECTED] writes: I am using Splus ... So why post to an R list? best, -tony -- Anthony Rossini Research Associate Professor [EMAIL PROTECTED]http://www.analytics.washington.edu/ Biomedical and Health Informatics University of

[R] automating sequence of multinomial regressions

2004-07-27 Thread Daniel
Disclaimer first: I only heard about R fairly recently, so I apologize if this is either a simple or impossible request, but R looked like it might be a good framework for this sort of thing... Is it possible to write a script to run stepwise multinomial regressions on many *dependent* variables,

Re: [R] automating sequence of multinomial regressions

2004-07-27 Thread Gabor Grothendieck
Daniel spamiam at aroint.org writes: Disclaimer first: I only heard about R fairly recently, so I apologize if this is either a simple or impossible request, but R looked like it might be a good framework for this sort of thing... Is it possible to write a script to run stepwise