Re: [R] How to insert one element into a vector?

2004-11-23 Thread Jari Oksanen
On Mon, 2004-11-22 at 17:43, Barry Rowlingson wrote: Deepayan Sarkar wrote: Pretty much what 'append' does. A shame then, that help.search(insert) doesn't find 'append'! I cant think why anyone looking for a way of _inserting_ a value in the middle of a vector would think of looking

[R] Mode?

2004-11-23 Thread LONG Yu
Dear all, I want to find out the mode for a data set, anyone knows how to do it in R? I tried the codes below, but it seems too long: tt-table(data1) #get the frequency tables of data1 oo-order(tt);#get the order of frequencies len-length(tt) #the length of the

Re: [R] optimize in very small values

2004-11-23 Thread Uwe Ligges
Troels Ring wrote: I hope you will forgive me this simple question on titration. I'm trying to find very small values from the algorithm below, which I believe is correctly formatted, and the constants are also correct. When SID goes over ATOT, fitted vales are much too low compared to the

Re: [R] Mode?

2004-11-23 Thread Uwe Ligges
LONG Yu wrote: Dear all, I want to find out the mode for a data set, anyone knows how to do it in R? I tried the codes below, but it seems too long: tt-table(data1) #get the frequency tables of data1 oo-order(tt);#get the order of frequencies len-length(tt) #the

Re: [R] optimize in very small values - uniroot solved it

2004-11-23 Thread Troels Ring
Dear friends - just to prevent further loss of time on the problem below - I realized that it was really a root finding exercise and not a minimization - uniroot solved the problem. Sorry for the confusion. Best wishes Troels At 00:06 11/23/04, you wrote: I hope you will forgive me this simple

Re: [R] Mode?

2004-11-23 Thread Dimitris Rizopoulos
Hi Yu, this has been recently discussed in the list, look at: http://tolstoy.newcastle.edu.au/R/help/04/11/7054.html Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel:

[R] Batch

2004-11-23 Thread Claudia Paladini
Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Received-SPF: none (hypatia: domain of [EMAIL PROTECTED] does not designate permitted sender hosts) X-Virus-Scanned: by amavisd-new at stat.math.ethz.ch X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on

R: a question on plot(), workspace or method dispatch, NOT about: Re: [R] RWinEdt, other text editors and R2.01 a problem in pasting commands

2004-11-23 Thread giovanna jona lasinio
I'm using R since version 1.6, and I didn't redefine plot in my workspace (I would never even dream of doing anything like that), I didn't change any R-environment variable or option in the last 4 month. In my example x is a vector of 30 real values ... I installed the windows service pack2

Re: R: a question on plot(), workspace or method dispatch, NOT about: Re: [R] RWinEdt, other text editors and R2.01 a problem in pasting commands

2004-11-23 Thread Uwe Ligges
giovanna jona lasinio wrote: I'm using R since version 1.6, and I didn't redefine plot in my workspace (I would never even dream of doing anything like that), I didn't change any R-environment variable or option in the last 4 month. In my example x is a vector of 30 real values ... I installed

[R] sorting without order

2004-11-23 Thread Marc Mamin
Hello, In order to increase the performance of a script I'd like to sort very large vectors containing repeated integer values. I'm not interesting in having the values sorted, but only grouped. I also need the equivalent of index.return from the standard sort function:

R: R: a question on plot(), workspace or method dispatch, NOT about: Re: [R] RWinEdt, other text editors and R2.01 a problem in pasting commands

2004-11-23 Thread giovanna jona lasinio
The problem I'm pointing out do not happen if I type commands directly on the command window (as I wrote in the yesterday email) but it shows when I source any ascii file containing R-command lines, even files I used in several of my classes and always worked before. I'm starting to suspect a

Re: [R] Weibull survival regression

2004-11-23 Thread Ale iberna
I do not belive there is a plot method for survreg object. #You can plot survuval using the coeficents it returns: curve(exp(-(exp(-lung.wbs$coef[1])*x)^(1/lung.wbs$scale))) #Here is an exemple for lung data from library survival library(survival) data(lung) lung.wbs - survreg( Surv(time,

Re: [R] Weibull survival regression

2004-11-23 Thread Ale iberna
PS: You can plot hazard in a similar way Best regards, Ale iberna - Original Message - From: Eric Lim [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 7:56 AM Subject: [R] Weibull survival regression Dear R users, Please can you help me with a relatively

[R] Re: adjacent category model in ordinal regression

2004-11-23 Thread Claire Chabanet #3354
Hello, I suspect that vglm would do the job for the logit link. Try : data(pneumo) pneumo$let = log(pneumo$exposure.time) vglm(cbind(normal, mild, severe) ~ let, multinomial, pneumo) vglm(cbind(normal, mild, severe) ~ let, acat, pneumo) This is an adjacent category model

[R] Search enginge

2004-11-23 Thread Marwan Khawaja
Hello, The search engine in Netscape 7.1 does not seem to work for me -- it used to work fine before. I do get the html help page but nothing happens when I enter a keyword for search. Java plug in and it is enabled -- so this is not the problem. Any help would be appreciated. Thanks Marwan

Re: [R] Restore sources

2004-11-23 Thread Petr Pikal
On 22 Nov 2004 at 16:43, [EMAIL PROTECTED] wrote: I didn't know about rules, I found Email link in search engine as I remember. Anyhow, thanks for answer. I did use Hitory, just I was wondering if there is a command to use it in R and bring up everything On Windows each line of saved

Re: R: a question on plot(), workspace or method dispatch, NOT about: Re: [R] RWinEdt, other text editors and R2.01 a problem i

2004-11-23 Thread Petr Pikal
Hi Giovanna I have encountered such problem some time ago (so it had to be R 1.8-1.9 approximately). It was connected with some complicated plot statements and usually also with **non english** characters in annotation texts. I did not found any traceable or repeatable pattern and sometime it

R: R: a question on plot(), workspace or method dispatch, NOT about: Re: [R] RWinEdt, other text editors and R2.01 a problem i

2004-11-23 Thread giovanna jona lasinio
Thanks, at least this crazy behavior is not my exclusive problem :-) I think that if we understand how the OS operates when copying and pasting we may find a solution... -Messaggio originale- Da: Petr Pikal [mailto:[EMAIL PROTECTED] Inviato: marted, 23. novembre 2004 12:04 A: giovanna

Re: [R] Restore sources

2004-11-23 Thread Prof Brian Ripley
On Tue, 23 Nov 2004, Petr Pikal wrote: On 22 Nov 2004 at 16:43, [EMAIL PROTECTED] wrote: I didn't know about rules, I found Email link in search engine as I remember. Anyhow, thanks for answer. I did use Hitory, just I was wondering if there is a command to use it in R and bring up everything for

Re: [R] Search enginge

2004-11-23 Thread Prof Brian Ripley
On Tue, 23 Nov 2004, Marwan Khawaja wrote: The search engine in Netscape 7.1 does not seem to work for me -- it used to work fine before. Perhaps you need to undo what you changed, but we can't guess what that is. I do get the html help page but nothing happens when I enter a keyword for search.

Re: [R] sorting without order

2004-11-23 Thread Peter Dalgaard
Marc Mamin [EMAIL PROTECTED] writes: Hello, In order to increase the performance of a script I'd like to sort very large vectors containing repeated integer values. I'm not interesting in having the values sorted, but only grouped. I also need the equivalent of index.return from the

Re: [R] Mode?

2004-11-23 Thread francoisromain
Yhe question of finding the mode of a dataset has been discussed previously in the list not only for categorical data : search How can I get the mode in the search engine of the list. Hope this helps. Romain. Selon Uwe Ligges [EMAIL PROTECTED]: LONG Yu wrote: Dear all, I want to find

Re: [R] Weibull survival regression

2004-11-23 Thread Göran Broström
On Tue, Nov 23, 2004 at 06:56:56AM -, Eric Lim wrote: Dear R users, Please can you help me with a relatively straightforward problem that I am struggling with? I am simply trying to plot a baseline survivor and hazard function for a simple data set of lung cancer survival where

Re: [R] Weibull survival regression

2004-11-23 Thread Frank E Harrell Jr
Eric Lim wrote: Dear R users, Please can you help me with a relatively straightforward problem that I am struggling with? I am simply trying to plot a baseline survivor and hazard function for a simple data set of lung cancer survival where `futime' is follow up time in months and status is

[R] Re: R problems [Debian testing]

2004-11-23 Thread Dirk Eddelbuettel
Zoltan, On Tue, Nov 23, 2004 at 04:04:14AM -0800, Zoltan Nagy wrote: Hi, I wrote you this email because I have some problems with the R library's. I use R Version 2.0.0 and it cannot load some libraries, eg: library(); MASS** No title available (pre-2.0.0 install?)

RE: [R] Search enginge

2004-11-23 Thread Marwan Khawaja
Hi The problem was with my Netscape 7.1. Many thanks to Prof Ripley for pointing me to the right direction. Best Marwan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Prof Brian Ripley Sent: Tuesday, November 23, 2004 1:36 PM To: Marwan

Re: [R] sorting without order

2004-11-23 Thread Dimitris Rizopoulos
Hi Marc, continuing on Prof. Dalgaard's proposal, you could use: ix - unlist(split(seq(along=v), v), use.names=FALSE) but even with this, `sort()' seems faster if you are interseted only in grouping: v - sample(1:25000, 5, TRUE) ## system.time(ix - do.call(c,split(seq(along=v),v)),

Re: [R] sorting without order

2004-11-23 Thread Prof Brian Ripley
On Tue, 23 Nov 2004, Peter Dalgaard wrote: Marc Mamin [EMAIL PROTECTED] writes: Hello, In order to increase the performance of a script I'd like to sort very large vectors containing repeated integer values. I'm not interesting in having the values sorted, but only grouped. I also need the

Re: [R] Batch

2004-11-23 Thread partha_bagchi
You haven't given much detail to go on. So I have to make some assumptions (feel free to correct me if I am wrong): 1. You already know how to plot something in R from the R command line. 2. You know how to save your plotting commands in a text file (say fancyplots.R). If these are true, then

[R] ROracle: fetch return zero rows or empty dataset (a workaround!)

2004-11-23 Thread Sunny Ho
Hi All, If you had run into the problem with ROracle on Linux: fetch() returns zero rows or empty dataset, here is an easy safe work-around for you to try out. It works for me, and very likely it will work for you too. You must have root privilege to do this on your machine. Quick Instructions

[R] number of pairwise present data in matrix with missings

2004-11-23 Thread Andreas Wolf
is there a smart way of determining the number of pairwise present data in a data matrix with missings (maybe as a by-product of some statistical function?) so far, i used several loops like: for (column1 in 1:99) { for (column2 in 2:100) { for (row in 1:500) { if

Re: [R] sorting without order

2004-11-23 Thread Prof Brian Ripley
Try a `very long' vector as originally specified: v - sample(1:25000, 1e6, TRUE) system.time(ix - sort.list(v, method=radix), gcFirst=TRUE) [1] 0.14 0.01 0.15 0.00 0.00 system.time(x - sort(v), gcFirst=TRUE) [1] 0.42 0.02 0.44 0.00 0.00 system.time(x - sort(v, method=quick, index.return=TRUE),

RE: [R] The hidden costs of GPL software?

2004-11-23 Thread John Fox
Dear Duncan, I don't think that there is an automatic, nearly costless way of providing an effective solution to locating R resources. The problem seems to me to be analogous to indexing a book. There's an excellent description of what that process *should* look like in the Chicago Manual of

Re: [R] number of pairwise present data in matrix with missings

2004-11-23 Thread Gabor Grothendieck
Andreas Wolf andreas.wolf at uni-jena.de writes: : : is there a smart way of determining the number of pairwise present data : in a data matrix with missings (maybe as a by-product of some : statistical function?) : : so far, i used several loops like: : : for (column1 in 1:99) { : for

Re: [R] number of pairwise present data in matrix with missings

2004-11-23 Thread Prof Brian Ripley
Suppose your matrix is called A (`matrix' is not a good name). Then crossprod(!is.na(A)) is pretty efficient. Test: A - matrix(1, 6, 3) A[1,1] - A[3, 1] - A[2,2] - NA A [,1] [,2] [,3] [1,] NA11 [2,]1 NA1 [3,] NA11 [4,]111 [5,]111 [6,]

Re: [R] number of pairwise present data in matrix with missings

2004-11-23 Thread Frank E Harrell Jr
Andreas Wolf wrote: is there a smart way of determining the number of pairwise present data in a data matrix with missings (maybe as a by-product of some statistical function?) so far, i used several loops like: for (column1 in 1:99) { for (column2 in 2:100) { for (row in 1:500) { if

Re: [R] number of pairwise present data in matrix with missings

2004-11-23 Thread Dimitris Rizopoulos
Hi Andreas, maybe something like this could do it: mat - sample(0:3, 20*2, TRUE); dim(mat) - c(20,2) mat[sample(1:20, 4),] - NA mat sum(rowMeans(mat)==mat[,1], na.rm=TRUE) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health

Re: [R] timeDate

2004-11-23 Thread Yasser El-Zein
I am looking for up to the millisecond resolution. Is there a package that has that? On Mon, 22 Nov 2004 21:48:20 + (UTC), Gabor Grothendieck [EMAIL PROTECTED] wrote: Yasser El-Zein abu3ammar at gmail.com writes: From the document it is apparent to me that I need as.POSIXct (I have

Re: [R] number of pairwise present data in matrix with missings

2004-11-23 Thread Dimitris Rizopoulos
Sorry my first reply was not relevant, I understood a different thing. Dimitris - Original Message - From: Andreas Wolf [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 2:42 PM Subject: [R] number of pairwise present data in matrix with missings is there a smart

Re: [R] Weibull survival regression

2004-11-23 Thread Thomas Lumley
On Tue, 23 Nov 2004, Eric Lim wrote: Dear R users, Please can you help me with a relatively straightforward problem that I am struggling with? I am simply trying to plot a baseline survivor and hazard function for a simple data set of lung cancer survival where `futime' is follow up time in months

Re: [R] timeDate

2004-11-23 Thread james . holtman
You might want to check out 'chron'. This stores the time as days and fractions of a day. If you take the current date, as.numeric(chron(dates.=11/23/2004)) [1] 12745 you get the value above. If you change this to millisecond, you get as.numeric(chron(dates.=11/23/2004)) * 86400 *

Re: [R] The hidden costs of GPL software?

2004-11-23 Thread roger koenker
Having just finished an index I would like to second John's comments. Even as an author, it is difficult to achieve some degree of completeness and consistency. Of course, maybe a real whizz at clustering could assemble something very useful quite easily. All of us who have had the frustration

[R] Create a vector of combinations based on a table column names

2004-11-23 Thread Henrik Andersson
I want to create a character vector based on the table (shortened for display) below: Where there are ones in the matrix I want the column name to appear and where there are zeros nothing, which would make the vector in this shortened case: combinations - (A B,A C,A E H,A F G,B C D,E G H,A C D

Re: [R] timeDate

2004-11-23 Thread Martin Maechler
james == james holtman [EMAIL PROTECTED] on Tue, 23 Nov 2004 10:39:04 -0500 writes: james You might want to check out 'chron'. This stores the james time as days and fractions of a day. james If you take the current date, as.numeric(chron(dates.=11/23/2004)) james

Re: [R] The hidden costs of GPL software?

2004-11-23 Thread Jari Oksanen
On Tue, 2004-11-23 at 17:40, roger koenker wrote: Having just finished an index I would like to second John's comments. Even as an author, it is difficult to achieve some degree of completeness and consistency. Of course, maybe a real whizz at clustering could assemble something very

Re: [R] Create a vector of combinations based on a table column names

2004-11-23 Thread Eric Lecoutre
Hi, Here is something that does the job (though I am sure other people will find smarter solutions!): samp=matrix(sample(0:1,size=100,replace=TRUE ,prob=c(0.8,0.2)),ncol=10) colnames(samp)-LETTERS[1:10] unlist(lapply(apply(samp,1,FUN=function(vec) colnames(samp)[as.logical(vec)]

[R] IFELSE across large array?

2004-11-23 Thread Sander Oom
Dear all, As our previous email did not get any response, we try again with a reformulated question! We are trying to do something which needs an efficient loop over a huge array, possibly functions such as apply and related (tapply, lapply...?), but can't really understand syntax and examples

[R] Interactive plots in R?

2004-11-23 Thread Michal Blazejczyk
Hi all, As part of a research project we are creating a statistical software tool and will be using R as the computational engine. I was wandering whether we should also use R for plotting. R has a good plotting flexibility and an extensive library of available plot types. However, our

[R] data.frame into vector

2004-11-23 Thread Tiago R Magalhaes
Hi I want to extract a row from a data.frame but I want that object to be a vector . After trying some different ways I end up always with a data.frame or with the wrong vector. Any pointers? x - data.frame(a = factor(c('a',2,'b')), b = c(4,5,6)) I want to get a 4 I tried: as.vector(x[1,]) a

Re: [R] timeDate

2004-11-23 Thread Martin Maechler
MM == Martin Maechler [EMAIL PROTECTED] on Tue, 23 Nov 2004 17:04:41 +0100 writes: james == james holtman [EMAIL PROTECTED] on Tue, 23 Nov 2004 10:39:04 -0500 writes: james You might want to check out 'chron'. This stores the james time as days and fractions of a day.

Re: [R] timeDate

2004-11-23 Thread Prof Brian Ripley
On Tue, 23 Nov 2004, Martin Maechler wrote: james == james holtman [EMAIL PROTECTED] on Tue, 23 Nov 2004 10:39:04 -0500 writes: james You might want to check out 'chron'. This stores the james time as days and fractions of a day. james If you take the current date,

[Fwd: [R] Create a vector of combinations based on a table column names]

2004-11-23 Thread Adaikalavan Ramasamy
x - c(1,2,3.095,1,1,0,0,0,0,0,0, 2,2,1.687,1,0,1,0,0,0,0,0, 46,3,3.47,1,0,0,0,1,0,0,1, 47,3,1.563,1,0,0,0,0,1,1,0, 50,3,6.234,0,1,1,1,0,0,0,0, 148,4,3.663,0,0,1,0,1,0,1,1, 151,4,3.47,0,0,0,1,1,1,0,1, 177,5,5.411,1,0,1,1,1,0,0,1,

Re: [R] The hidden costs of GPL software?

2004-11-23 Thread Patrick Burns
I think John has exactly the right image -- index to a book -- but I disagree with his conclusions. I read somewhere that an index should not be done by the author. It was probably written by someone who was bored of indexing, but the logic was precisely because indices should be about concepts.

[R] locator and multiple plots

2004-11-23 Thread Stephane DRAY
Hello, I would like to know if it possible to use locator() only on one region of a graphic device. I would like to fragment a graphic device into sub-regions (using layout or split.screen or any other functions that I do not know) and then use locator. but I want that the locator is only used

RE: [R] Create a vector of combinations based on a table column n ames

2004-11-23 Thread Liaw, Andy
Here's another way: dat - read.table(clipboard, header=TRUE)[,-(1:3)] dat A B C D E F G H 1 1 1 0 0 0 0 0 0 2 1 0 1 0 0 0 0 0 3 1 0 0 0 1 0 0 1 4 1 0 0 0 0 1 1 0 5 0 1 1 1 0 0 0 0 6 0 0 1 0 1 0 1 1 7 0 0 0 1 1 1 0 1 8 1 0 1 1 1 0 0 1 9 1 0 1 1 0 1 1 0 apply(dat 0, 1, function(idx)

RE: [R] Create a vector of combinations based on a table column names

2004-11-23 Thread Andy Bunn
There has to be a better (more readable) way, but this works... set.seed(323) foo.df - data.frame(A = round(runif(5)), B = round(runif(5)), C = round(runif(5))) foo.df A B C 1 0 1 1 2 1 1 1 3 1 1 1 4 0 1 1 5 1 1 0 names.list - lapply( apply( foo.df, 1, function( x ) colnames( foo.df )[

[R] Quadratic curve on a loop

2004-11-23 Thread Jose A. Hernandez
Dear R community, once again I request your generous help on an R issue I cannot seem to figure out. I am trying to do some analysis for multiple sites, in my example I am using only two, but the same will done on many sites. It's just ONE line, so I hope somebody can give a me a hand by

Re: [R] data.frame into vector

2004-11-23 Thread Prof Brian Ripley
A data frame is a list, and a list is a vector. Once you understand that, yoy may understand what you are seeing. as.matrix(x)[1,] seems to be one of the easiest ways to get what you want On Tue, 23 Nov 2004, Tiago R Magalhaes wrote: Hi I want to extract a row from a data.frame but I want that

[R] Convergence problem in GLMM

2004-11-23 Thread John Fox
Dear list members, In re-running with GLMM() from the lme4 package a generalized-linear mixed model that I had previously fit with glmmPQL() from MASS, I'm getting a warning of a convergence failure, even when I set the method argument of GLMM() to PQL: bang.mod.1 - glmmPQL(contraception ~

RE: [R] IFELSE across large array?

2004-11-23 Thread Liaw, Andy
I'll give it half a crack: Steps a through c can be done via nested ifelse(), treating A and M as vectors (as they really are). Step d is the hard one. I'd write a simple Fortran code and use .Fortran() for that. I don't see how any of the *apply() functions can help here, as your operations

[R] SAS or R software

2004-11-23 Thread Jose A. Hernandez
Hi Neela, Just my ¢2 regarding the R vs. SAS issue. I started to use SAS since my undergraduate studies in 1993, and I am now a migrating to R user, and I hope not to ever go back to SAS. My comments are: - SAS is huge it takes over 1GB of space of my PC while R takes just over 100 MB, this

RE: [R] data.frame into vector

2004-11-23 Thread Liaw, Andy
Is this what you want? as.matrix(x[1,])[1,] a b a 4 HTH, Andy From: Tiago R Magalhaes Hi I want to extract a row from a data.frame but I want that object to be a vector . After trying some different ways I end up always with a data.frame or with the wrong vector. Any pointers?

Re: [R] Interactive plots in R?

2004-11-23 Thread Greg Snow
Michal Blazejczyk [EMAIL PROTECTED] 11/23/04 09:21AM Hi all, As part of a research project we are creating a statistical software tool and will be using R as the computational engine. I was wandering whether we should also use R for plotting. R has a good plotting flexibility and an

RE: [R] Quadratic curve on a loop

2004-11-23 Thread Jose A. Hernandez
Please disregard my message I've seen the light now... curve(predict(out, data.frame(x = x)), add = T) Thanks, Jose -- Jose A. Hernandez Department of Soil, Water, and Climate University of Minnesota 1991 Upper Buford Circle St. Paul, MN 55108 Ph. (612) 625-0445, Fax. (612) 625-2208

Re: [R] data.frame into vector

2004-11-23 Thread Marc Schwartz
On Tue, 2004-11-23 at 16:27 +, Tiago R Magalhaes wrote: Hi I want to extract a row from a data.frame but I want that object to be a vector . After trying some different ways I end up always with a data.frame or with the wrong vector. Any pointers? x - data.frame(a =

[R] R/S System: Advanced Programming, San Francisco ***December 20-21, 2004

2004-11-23 Thread elvis
R/S Advanced Programming course in San Francisco on December 20-21st, 2004 Please check out the full description and Agenda of the 2-day class on the website: www.xlsolutions-corp.com/Radv.htm And let us know if we should hold seats for you. Ask for group discount! Here's the outline: Course

RE: [R] IFELSE across large array?

2004-11-23 Thread Marc Schwartz
On Tue, 2004-11-23 at 12:28 -0500, Liaw, Andy wrote: I'll give it half a crack: Steps a through c can be done via nested ifelse(), treating A and M as vectors (as they really are). Step d is the hard one. I'd write a simple Fortran code and use .Fortran() for that. I don't see how any

Re: [R] How to correct this

2004-11-23 Thread Paul Murrell
Hi Mulholland, Tom wrote: This raises the question of best practice. My answer was predicated on the fact that Jin Li had been attempting to use grid.circle in the first place without success. I rashly made the assumption that there was already a move to try and use some of the more

[R] How to extract data?

2004-11-23 Thread ebashi
I appreciate if anyone can help me, I have a table as follow, rate DATE VALUE 1 1997-01-10 5.30 2 1997-01-17 5.30 3 1997-01-24 5.28 4 1997-01-31 5.30 5 1997-02-07 5.29 6 1997-02-14 5.26 7 1997-02-21 5.24 8 1997-02-28 5.26 9 1997-03-07 5.30 10 1997-03-14 5.30

[R] Help me to migrate from SAS

2004-11-23 Thread Jose A. Hernandez
R-community, Assuming a file with 3 columns: site, nrate, yield. In SAS I can easily run the analysis BY SITE using the following code: *--*; proc nlin method=MARQUARDT; by farm; parms b0=100 b1=0.33 b2=-0.00111 x0=120; model yield = (b0 + b1 * nrate

Re: [R] How to extract data?

2004-11-23 Thread james . holtman
By 'ignore', can we delete those from the list of data? I would then assume that if you have a sequence of +0+0+ that you would want the last + for the increase of three. If that is the case, then do a 'diff' and delete the entries that are 0. Then create a new 'diff' and then use 'rle' to

RE: [R] Help me to migrate from SAS

2004-11-23 Thread Liaw, Andy
Perhaps you would be interested in the nlsList() function in the nlme package. HTH, Andy From: Jose A. Hernandez R-community, Assuming a file with 3 columns: site, nrate, yield. In SAS I can easily run the analysis BY SITE using the following code:

RE: [R] The hidden costs of GPL software?

2004-11-23 Thread Liaw, Andy
From: Patrick Burns I think John has exactly the right image -- index to a book -- but I disagree with his conclusions. I read somewhere that an index should not be done by the author. It was probably written by someone who was bored of indexing, but the logic was precisely because

RE: [R] The hidden costs of GPL software?

2004-11-23 Thread Philippe Grosjean
Patrick Burns wrote: [] No, I'm not volunteering to build the system. Too bad! ;-) Indeed, the idea to index tens of thousands of functions could not be appealing to many of us! Why not to consider to test such ideas at the package level? I mean, building a system that points out the

RE: [R] Quadratic curve on a loop

2004-11-23 Thread Liaw, Andy
AFAICS, there are two errors: 1. curve() is probably not what you want: it plots functions, and that's not what predict() gives you. 2. predict() needs to be given the correct data frame: The name of the variable(s) need to match those used in the formula. The formula has `x' on the righthand

Re: [R] Convergence problem in GLMM

2004-11-23 Thread Deepayan Sarkar
On Tuesday 23 November 2004 11:14, John Fox wrote: Dear list members, In re-running with GLMM() from the lme4 package a generalized-linear mixed model that I had previously fit with glmmPQL() from MASS, I'm getting a warning of a convergence failure, even when I set the method argument of

Re: [R] The hidden costs of GPL software?

2004-11-23 Thread Mike Prager
At 11/23/2004 11:45 AM Tuesday, Patrick Burns wrote: ...There could be an index builder that accepts a search phrase and the function or package that is the successful answer to the search. If this were open, then R users could contribute to the index who don't feel qualified to submit code. It

[R] Weibull survival regression

2004-11-23 Thread Eric Lim
A big thank you to everyone who responded... Using Ale iberna solution with the lung dataset, I obtained: plot(survfit(Surv(time,status),data=lung)) Error in Surv(time, status) : Time variable is not numeric In addition: Warning message: is.na() applied to non-(list or vector) in: is.na(time)

RE: [R] Convergence problem in GLMM

2004-11-23 Thread John Fox
Dear Deepayan, Thanks for the explanation (and for pointing out that the data set is also in the lme4 package). I had tried control=lmeControl(tolerance=1e-4, PQLmaxIt=100) and control=lmeControl(PQLmaxIt=1000), but gave up at that point. I just tried lmeControl(tolerance=1e-4, PQLmaxIt=1000),

Re: [R] Weibull survival regression

2004-11-23 Thread Thomas Lumley
On Tue, 23 Nov 2004, Eric Lim wrote: Using Thomas Lumley's solution with the lung dataset, I obtained: curve(pweibull(x, scale=1/coef(lung.wbs), shape=1/lung.wbs$scale, lower.tail=FALSE),from=0, to=max(lung$time)) That's because you read the part of the message where I got the

RE: [R] IFELSE across large array?

2004-11-23 Thread Ray Brownrigg
From: Liaw, Andy [EMAIL PROTECTED] Date: Tue, 23 Nov 2004 12:28:48 -0500 I'll give it half a crack: Steps a through c can be done via nested ifelse(), treating A and M as vectors (as they really are). Step d is the hard one. I'd write a simple Fortran code and use .Fortran() for that.

Re: [R] How to correct this

2004-11-23 Thread Tom Mulholland
It has been a while since I looked at those two sources. My main impetus has been the detail. I think that one of the aims of my project has been to document the variants that might not be given a name. I have a function called tufte158 (Tufte, The Visual Display of Quantitative Information

[R] route generation capabilites?

2004-11-23 Thread Jeff D. Hamann
I have a short simulation problem (well it's not *that* short) that requires I create all the possible routes amongst a set of destinations. I didn't seem to find anything regarding route generation on the website and wanted to know if it's possible to generate routes using R (via

RE: [R] The hidden costs of GPL software?

2004-11-23 Thread David Forrest
On Tue, 23 Nov 2004, Philippe Grosjean wrote: Patrick Burns wrote: [] No, I'm not volunteering to build the system. Too bad! ;-) Indeed, the idea to index tens of thousands of functions could not be appealing to many of us! Why not to consider to test such ideas at the package

Re: [R] timeDate

2004-11-23 Thread Gabor Grothendieck
Yasser El-Zein abu3ammar at gmail.com writes: : : I am looking for up to the millisecond resolution. Is there a package : that has that? : : On Mon, 22 Nov 2004 21:48:20 + (UTC), Gabor Grothendieck : ggrothendieck at myway.com wrote: : Yasser El-Zein abu3ammar at gmail.com writes: : :

[R] list of lists question

2004-11-23 Thread Karla Sartor
Hello all, As a general programming question I can't seem to figure out how to make a list of lists in R. As matrices won't work as they have to be rectangular. I am sure that there is an easy solution but... the specific situation is this: - I have created a Tukey confidence interval table and

RE: [R] list of lists question

2004-11-23 Thread Liaw, Andy
From: Karla Sartor Hello all, As a general programming question I can't seem to figure out how to make a list of lists in R. As matrices won't work as they have to be rectangular. I am sure that there is an easy solution but... the specific situation is this: - I have created a

Re: [R] list of lists question

2004-11-23 Thread Spencer Graves
Is the following more like what you want: a=c(1,1,1,1,1) # generate the first list b=c(2,2,2)# generate a second list d=list(a,b)# make a list of a and b ( e=c(d,a) ) [[1]] [1] 1 1 1 1 1 [[2]] [1] 2 2 2 [[3]] [1] 1 [[4]] [1] 1

[R] an R function to search on Prof. Baron's site

2004-11-23 Thread Liaw, Andy
Inspired by the functions that Barry Rawlingson and Dave Forrest posted for searching Rwiki and R-help archive, I've made up a function that does the search on Prof. Baron's site (Thanks to Prof. Baron's help on setting up the query string!): RSiteSearch - function(string, restrict=Rhelp,

[R] T-test syntax question

2004-11-23 Thread Steve Freeman
Hi. I'd like to do a t-test to compare the Delta values of items with Crit=1 with Delta values of items with Crit=0. What is the t.test syntax? It should produce a result like this below (I can't get in touch with the person who originally did this for me) Welch Two Sample t-test data:

Re: [R] Convergence problem in GLMM

2004-11-23 Thread Richard A. O'Keefe
I was trying to install some more packages and ran into a problem I hadn't seen before. Version: platform sparc-sun-solaris2.9 arch sparc os solaris2.9 system sparc, solaris2.9 status major2

Re: [R] an R function to search on Prof. Baron's site

2004-11-23 Thread Gabor Grothendieck
Liaw, Andy andy_liaw at merck.com writes: : : Inspired by the functions that Barry Rawlingson and Dave Forrest posted for : searching Rwiki and R-help archive, I've made up a function that does the : search on Prof. Baron's site (Thanks to Prof. Baron's help on setting up the : query string!):

[R] CRLF-terminated Fortran files

2004-11-23 Thread Prof Brian Ripley
What did this have to do with GLMM? I've changed the subject line. On Wed, 24 Nov 2004, Richard A. O'Keefe wrote: I was trying to install some more packages and ran into a problem I hadn't seen before. We've seen it for C, and test it for C in R CMD check. I think we should check C++ and

[R] R 2.0.1 jpeg() png() pdf() Mac OSX 10.3.5 - empty files being created

2004-11-23 Thread Thuan-Jin Kee
Hi everyone, I've been opening up R 2.0.1 from the dock and then starting the Mac OSX X11 server. After that I call jpeg(test.jpg,plot(rnorm(10))) and r pops up a quartz window with the appropriate graph in it and puts a file called test.jpg into the HOME which is 0kb in size and is completely

Re: [R] R 2.0.1 jpeg() png() pdf() Mac OSX 10.3.5 - empty files being created

2004-11-23 Thread Prof Brian Ripley
On Wed, 24 Nov 2004, Thuan-Jin Kee wrote: I've been opening up R 2.0.1 from the dock and then starting the Mac OSX X11 server. After that I call jpeg(test.jpg,plot(rnorm(10))) Please do read the help page: the syntax is jpeg(test.jpg) plot(rnorm(10)) dev.off() and r pops up a quartz window with

Re: [R] The hidden costs of GPL software? - None

2004-11-23 Thread John
Off hand, the costs of GPL'd software are not hidden at all. R for instance demands that a would be user sit down and learn the language. This in turn pushes a user into learning more about statistics than the simple overview that Stat 1 presents a student. In contrast, any program that

[R] (no subject)

2004-11-23 Thread angelare
Good morning, I have to apply the Ks test with the the t distribution. I know I have to write ks.test(data_name,distribution_name, parameters..) but I don't know what is the name fot t distribution and which parameters to introduce? may be mean=0 and freedom degrees in my case? Thank you for