[R] lmer{lme4}, poisson family and residuals

2006-04-20 Thread Amelie LESCROEL
Hello, I’m trying to fit the following model: Dependent variable: MAXDEPTH (the maximum depth reached by a penguin during a given dive) Fixed effects: SUCCESSMN (an index of the “individual quality” of a bird), STUDYDAY (the day of the study, from -5 to 20, with 0=Dec 20), and the

Re: [R] PCA biplot question

2006-04-20 Thread Tyler Smith
I think you're asking how to plot arrows for variables in one dataset onto the PCA plot for another dataset? You can do this with functions from the vegan package. Particularly, vector and factor fitting can be done with envfit() and surface fitting with ordisurf(). There's a good tutorial at:

[R] the difference between x1 and x1

2006-04-20 Thread Chad Reyhan Bhatti
Hello, I am not sure what to write in the subject line, but I would like to take a character string that is a variable in a data frame and apply a function that takes a numeric argument to this character string. Here is a simplified example that would solve my problem. Imagine I have my data

Re: [R] Parallel computing with the snow package: external file I/O possible?

2006-04-20 Thread Waichler, Scott R
Hello, After getting help to solve part of my problem and some delay on my part, I am posting a more refined version to see if someone can help me further. I am trying to autocalibrate a model in my subject area using the snow and rgenoud packages. I want to use the key function fn that is

Re: [R] the difference between x1 and x1

2006-04-20 Thread Gabor Grothendieck
Try this: # test data set.seed(1) DF - data.frame(x1 = rnorm(5), x2 = rnorm(5), x3 = rnorm(5)) DF model.list - c(x2, x3) # transform for(v in model.list) DF[v] - floor(DF[v]) On 4/20/06, Chad Reyhan Bhatti [EMAIL PROTECTED] wrote: Hello, I am not sure what to write in the subject line, but I

Re: [R] the difference between x1 and x1

2006-04-20 Thread Duncan Murdoch
On 4/20/2006 7:02 PM, Chad Reyhan Bhatti wrote: Hello, I am not sure what to write in the subject line, but I would like to take a character string that is a variable in a data frame and apply a function that takes a numeric argument to this character string. Remember that dataframes are

Re: [R] the difference between x1 and x1

2006-04-20 Thread Francisco J. Zagmutt
Is this what you are after? floor(data[,model.list]) Or I just didn't understand what you are trying to accomplish? cheers Francisco PS: try to avoid using names that are already reserved to a function like data See ?data From: Chad Reyhan Bhatti [EMAIL PROTECTED] To:

[R] R and ViM

2006-04-20 Thread Jose Quesada
To: Martin Maechler [EMAIL PROTECTED] Indeed. Please do check the archives. Yep. Post is there. Now back to the subject: Jose, I think your main contribution is based on autoHotKeys and that only works on Windoze, right? Michael explicitly mentioned he's working in Mac OS X. Martin

Re: [R] second try; writing user-defined GLM link function

2006-04-20 Thread Jessi Brown
An update for all: Using the combined contributions from Mark and Dr. Ripley, I've been (apparently) successfully formulating both GLM's and GLMM's (using the MASS function glmmPQL) analyzing my nest success data. The beta parameter estimates look reasonable and the top models resemble those

[R] how to control the data type

2006-04-20 Thread zhongmiao wang
Hello: I am generating a random number with rnorm(1). The generated number has 8 decimals. I don't want so many decimals. How to control the number of decimals in R? Thanks! Zhongmiao Wang __ R-help@stat.math.ethz.ch mailing list

Re: [R] how to do Splus compare() function in R

2006-04-20 Thread Bellinger Instruments P/L
The sign() function requires one argument, and returns the sign of the value, where I require a number -1, 0, or 1 depending on if the value is , ==, or the first argument. This is the Splus function when listed, compare function(e1, e2) .Internal(compare(e1, e2), do_op, T, 18) unfortunately

Re: [R] how to do Splus compare() function in R

2006-04-20 Thread Christos Hatzis
As suggested below, sign(ii*1e9-f) will give you the same result as the S-plus compare(ii*1e-9,f) -Christos -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bellinger Instruments P/L Sent: Thursday, April 20, 2006 11:02 PM To: 'Prof Brian Ripley' Cc:

Re: [R] how to do Splus compare() function in R [Broadcast]

2006-04-20 Thread Liaw, Andy
You need to tell us what compare() in S-PLUS does; i.e., what does it take as input and what does it output. Presumably the information would be in the help page for compare(). Telling us what the function looks like in S-PLUS is of no use, since most likely the code cannot be used in R

Re: [R] I am surprised (and a little irritated)

2006-04-20 Thread Tom Backer Johnsen
Detlef Steuer wrote: Hi again, ... This new rpm R-base-2.3.0-beta should automatically resolve dependencies. At least it did so on my machine. I would be happy to get a report, if you try to install this one and find difficulties or success!. Most important would be to report missing

[R] Linker incompatability in stalling R on Solaris 2.9

2006-04-20 Thread Min Shao
Hi, I am trying to compile R-2.2.1 on Solaris 2.9 with a 64-bit build. Following the instructions in R Installation and Adminstration, I changed the following settings in config.site: [[alternative HTML version deleted]] __

[R] Linker problem in installing 64-bit R

2006-04-20 Thread Min Shao
Hi, I am trying to compile R-2.2.1 on Solaris 2.9 with a 64-bit build. Following the instructions in R Installation and Adminstration, I changed the following settings in config.site: CC=gcc -m64 F77=g77 -64 CXX=g++ -m64 LDFLAGS=-L/usr/local/lib/sparcv9 -L/usr/local/lib But I got the following

Re: [R] how to do Splus compare() function in R

2006-04-20 Thread Prof Brian Ripley
You would need to tell us what it does (and what the inputs are). I think it is likely that compare(x, y) in S-PLUS is the same as sign(x-y) in R, at least with numeric vector inputs. On Thu, 20 Apr 2006, Bellinger Instruments P/L wrote: Hi I have a source file in Splus that fails in R as I

Re: [R] there is no xls reader in R?

2006-04-20 Thread Ko-Kang Kevin Wang
Have a look at the read.xls() in gdata package. HTH, Kevin Michael wrote: Currently I have to convert all my xls into csv before I can read it in and process the excel data in R... Is there a way to directly read in xls data? Thanks a lot! [[alternative HTML version deleted]]

Re: [R] comparing execition time: R vs matlab linear algebra...

2006-04-20 Thread Prof Brian Ripley
You haven't told us your platform. On most platforms, R does not build/ship with an optimized BLAS, and this can make a big difference to execution times of such problems. See the R-admin manual. Beyond that, qr/qr.coef is not the most obvious way to solve linear systems (solve is), and the

[R] R-squared for MARS models

2006-04-20 Thread Marco Girardello
Hi, is there an R function which can compute the R-squared for a mars model fitted using the mda package? many thanks in advance best regards Marco Girardello __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] R-squared for MARS models

2006-04-20 Thread Gavin Simpson
On Wed, 2006-04-19 at 21:18 +0200, Marco Girardello wrote: Hi, is there an R function which can compute the R-squared for a mars model fitted using the mda package? many thanks in advance best regards Marco Girardello Julian Faraway's Extending the Linear Model with R Chapman

[R] Need R code

2006-04-20 Thread stat stat
Dear r-users, Suppose I have three datasets: Dataset-1: Date x y Jan-1,2005120 230 Jan-2,2005123 -125 Jan-3,2005-110 300 Jan-4,2005114 -21 Jan-7,200511299 Mar-5,2005200 311 Dataset-2: Date

[R] Bootstrap error message: Error in statistic(data, original, ...) : unused argument(s) ( ...)

2006-04-20 Thread Michael
Dear colleagues, I've been swamped and fighting with error for a few hours but still desperately having absolutely no clue: What's wrong with my bootstraping code? Thanks a lot! Error Message: bootResults=boot(X, myFun, R=1); Error in statistic(data, original,

Re: [R] A question about nlme

2006-04-20 Thread Peter Dalgaard
zhongmiao wang [EMAIL PROTECTED] writes: Hello, I have used nlme to fit a model, the R syntax is like fmla0-as.formula(paste(~,paste(colnames(ldata[,9:13]),collapse=+),-1)) fmla1-as.formula(paste(~,paste(colnames(ldata[,14:18]),collapse=+),-1))

[R] about vsn

2006-04-20 Thread XinMeng
Hi all: As to vsn package,how can I transform my raw data format to the demo data of vsn(named kidney)? My raw data: namesignal dye gene1 815.32 green gene2 671.66 green gene3 713.93 green gene4 703.97 green gene5 493.59 green gene6 477.92 green gene7 346.55 green

Re: [R] 3D pie

2006-04-20 Thread Ted Harding
On 19-Apr-06 Peter Ehlers wrote: This discussion of 3-d pie charts comes at an opportune time. I have just formulated a new theory of graphical information transfer which is particularly simple in the case of 3-d pie charts. Let theta denote the angle between the normal to the pie cylinder

Re: [R] 3D pie

2006-04-20 Thread COMTE Guillaume
Hi all, I can understand that it isn't the right way to represent data, i knew that i would hurt some people on this mailling list to discuss about pie. As i've specified on my first message: My only purpose of drawing 3D pie is for customer who don't have to understand what is drawn , but only

[R] R-Help

2006-04-20 Thread stat stat
Dear r-users, Suppose I have three datasets: Dataset-1: Date x y Jan-1,2005120 230 Jan-2,2005123 -125 Jan-3,2005-110 300 Jan-4,2005114 -21 Jan-7,200511299 Mar-5,2005200 311 Dataset-2: Date

Re: [R] prop.table on three-way table?

2006-04-20 Thread Fredrik Karlsson
Hi marc, I did not manage ctab to do this for me. Again, I am probably using it wrong, but I don't know that the problem is. You asked for a more illustrated example, so here goes: Take this table: ftable(table(sample(paste(dim1_no,1:5,sep=),10,replace=TRUE),

Re: [R] I am surprised (and a little irritated)

2006-04-20 Thread Tom Backer Johnsen
Detlef Steuer wrote: Hi, I`m the one to blame for the readme :-) and for providing the rpms. I am sorry, but the note was not primarily directed at you, perhaps (I am not sure) just as much at Linux in general, or Suse, or OpenSuse, or ... In any case, I am sure you do a great job at

[R] Extract AIC, BIC

2006-04-20 Thread Sumanta Basak
Hi All, How can extract AIC,BIC from a fitted Garch model? -- SUMANTA BASAK. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] I am surprised (and a little irritated)

2006-04-20 Thread Tom Backer Johnsen
Gabor Csardi wrote: So you don't want to read that manual after all? :) I did not say so, not at all. The point is that it is not very helpful to say Read the manual when the the problem is very much one of not knowing where to look in the manual. Instructions for installing on a particular

[R] nls and factor

2006-04-20 Thread Manuel Gutierrez
Is it possible to include a factor in an nls formula? I've searched the help pages without any luck so I guess it is not feasible. I've given it a few attempts without luck getting the message: + not meaningful for factors in: Ops.factor(independ^EE, a) This is a toy example, my realworld case is

Re: [R] Breakdown a number

2006-04-20 Thread Paul Roebuck
On Thu, 20 Apr 2006, Gabor Grothendieck wrote: On 4/19/06, Paul Roebuck [EMAIL PROTECTED] wrote: On Wed, 19 Apr 2006, Gabor Grothendieck wrote: On 4/19/06, Paul Roebuck [EMAIL PROTECTED] wrote: Isn't there a builtin method for doing this and, if so, what is it called?

Re: [R] nls and factor

2006-04-20 Thread Andrew Robinson
Manuel, I don't think that it works very easily. Instead, try gnls() in the nlme package. Cheers Andrew On Thu, Apr 20, 2006 at 11:18:02AM +0200, Manuel Gutierrez wrote: Is it possible to include a factor in an nls formula? I've searched the help pages without any luck so I guess it is not

[R] info : Manova - eigenvector analysis and canonical analysis

2006-04-20 Thread Céline Hauzy
Hello everybody ! I try to obtain in R eigenvectors and canonical analysis on MANOVA results, but I don't find how to process? In particular, I would be interesting to obtain standardized canonical coefficients of the canonical variates. There analysis give some information on the correlation

Re: [R] nls and factor

2006-04-20 Thread Manuel Gutierrez
Thanks Andrew. I am now trying but without much success. I don't now how to give start values for the factor?. Could you give me an example solution with my toy example? a-as.factor(c(rep(1,50),rep(0,50))) independ-1:100 respo-rep(NA,100) respo[a==1]-(independ[a==1]^2.3)+2

Re: [R] Randomly selecting one row for each factor level [Broadca st]

2006-04-20 Thread Liaw, Andy
The following should work: dfr.samp - dfr[tapply(1:nrow(dfr), dfr$x, sample, 1),] dfr.samp x y z 10 a 10 J 2 b 2 B 9 c 9 I Andy From: Kelly Hildner I don't use R much, and I have been unable to figure out how to get the subset of my data frame that I would like. For example,

Re: [R] I am surprised (and a little irritated)

2006-04-20 Thread Tom Backer Johnsen
Detlef Steuer wrote: On Thu, 20 Apr 2006 10:51:57 +0200 . Sometimes it is very hard to think of the questions a new user has, if you do it yourself on a daily basis for years. I understand that very well. Now I can tell you that I used the info in the Hacking OpenSuse link you provided

Re: [R] 3D pie

2006-04-20 Thread Barry Rowlingson
Rolf Turner wrote: People really ***should not*** be encouraged or abetted in wrong-headedness. Excel is terrible. Pie charts are terrible. Don't mess with them. Period. Now I realise the opportunity I missed on April 1st, when I was going to try and (anonymously) post the most

[R] info : Manova - eigenvector analysis and canonical analysis

2006-04-20 Thread Céline Hauzy
Hello everybody ! I try to obtain in R eigenvectors and canonical analysis on MANOVA results, but I don't find how to process? In particular, I would be interesting to obtain standardized canonical coefficients of the canonical variates. There analysis give some information on the correlation

Re: [R] 3D pie

2006-04-20 Thread Stuart Leask
On 19-Apr-06 Peter Ehlers wrote: This discussion of 3-d pie charts comes at an opportune time. I have just formulated a new theory of graphical information transfer which is particularly simple in the case of 3-d pie charts. Let theta denote the angle between the normal to the pie cylinder

Re: [R] nls and factor

2006-04-20 Thread Prof Brian Ripley
On Thu, 20 Apr 2006, Manuel Gutierrez wrote: Is it possible to include a factor in an nls formula? Yes. What do you intend by it? If you mean what it would mean for a lm formula, you need A[a] and starting values for A. There's an example on p.219 of MASS4. I've searched the help pages

[R] (sem assunto)

2006-04-20 Thread Eric Ferreira
Dear R-colleagues, Is it possible to mix TEXT and VALUE of objects in y (or x) label of a plot? For instance: f-2 plot(..., ylab='Axis f', ...) where f means the VALUE of f. Thany you in advance, Eric. -- Barba Departamento de Ciências Exatas Universidade Federal de Lavras Minas Gerais -

Re: [R] Breakdown a number

2006-04-20 Thread Gabor Grothendieck
Try using breaks[breaks = x] in place of breaks. Your solution always returns three components if breaks has two whereas this one does not but you could extend the output it if that is an essential part. On 4/20/06, Paul Roebuck [EMAIL PROTECTED] wrote: On Thu, 20 Apr 2006, Gabor Grothendieck

Re: [R] R-Help

2006-04-20 Thread Gabor Grothendieck
Read them in as zoo objects (you can replace textConnection(Lines1) with the filename) and then merge them using all = FALSE to retain only common time points. Note that in my English locale I had to modify your Apl to Apr. Lines1 - Date x y Jan-1,2005120 230

Re: [R] (sem assunto)

2006-04-20 Thread Chuck Cleland
f - 2 plot(runif(10), ylab=paste(Axis, f, collapse= )) ?paste Eric Ferreira wrote: Dear R-colleagues, Is it possible to mix TEXT and VALUE of objects in y (or x) label of a plot? For instance: f-2 plot(..., ylab='Axis f', ...) where f means the VALUE of f. Thany you in advance,

Re: [R] (sem assunto)

2006-04-20 Thread Gabor Grothendieck
Try paste: paste(Axis, f) On 4/20/06, Eric Ferreira [EMAIL PROTECTED] wrote: Dear R-colleagues, Is it possible to mix TEXT and VALUE of objects in y (or x) label of a plot? For instance: f-2 plot(..., ylab='Axis f', ...) where f means the VALUE of f. Thany you in advance, Eric.

Re: [R] prop.table on three-way table?

2006-04-20 Thread Marc Schwartz
On Thu, 2006-04-20 at 10:28 +0200, Fredrik Karlsson wrote: Hi marc, I did not manage ctab to do this for me. Again, I am probably using it wrong, but I don't know that the problem is. You asked for a more illustrated example, so here goes: Take this table:

Re: [R] there is no xls reader in R?

2006-04-20 Thread roger bos
I like to use the RODBC package for doing this. Here is my code sample: xls - odbcConnectExcel(fname) rawdata.temp - sqlFetch(xls, rawdata, max=2800) close(xls) fname is the full path to the file and rawdata is the name of the excel sheet I want to import. I tried one

Re: [R] R-Help

2006-04-20 Thread john seers \(IFR\)
I think this does what you require. #Read your data in whatever way you wish: d1-data.frame(Date=c(2005/1/1,2005/2/1,2005/1/3,2005/1/4,2005/ 1/7,2005/3/5), x=c(119,123,-110,114,11,200), y=c(230,-125,300,-21,299,311))

Re: [R] I am surprised (and a little irritated)

2006-04-20 Thread Tom Backer Johnsen
Detlef: For your information. A few days ago I ordered SuSE 10, the version corresponding to the old Professional. It arrived today, and was installed. When the R-base rpm was downloaded with Mozilla Firebird, it was only to open it when the download was finished, click the install with YaST

[R] more on aov contrasts residual error calculation

2006-04-20 Thread Steven Lacey
Hi, I haven't recieved any replies to my last email, so let me be a bit more specific. I have a dataframe and it has the following structure: Condition Mapping SubjectABC 11 510 15 1

[R] Online course - graphics in R

2006-04-20 Thread Peter C. Bruce
Dr. Paul Murrell will offer his Graphics in R course online at statistics.com May 5 – June 2. This course teaches you how to produce publication-quality statistical plots of data using R (a freely available open- source statistical language and environment). It will cover plots such as

Re: [R] (sem assunto)

2006-04-20 Thread Eric Ferreira
Thak you very much indeed! Eric. On 4/20/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Try paste: paste(Axis, f) On 4/20/06, Eric Ferreira [EMAIL PROTECTED] wrote: Dear R-colleagues, Is it possible to mix TEXT and VALUE of objects in y (or x) label of a plot? For instance:

[R] S4 objects with list of objects as slots: how to subset?

2006-04-20 Thread Francois . Bastardie
Hello, I don't manage to see if you have already focussed on this point in some previous messages so I post my question: I have a little problem with the S4 style of programming. I tried to formalize my question: please consider the following example that you can run I think:

Re: [R] S4 objects with list of objects as slots: how to subset?

2006-04-20 Thread Gabor Grothendieck
Try: c(sapply(1:2, function(i) [EMAIL PROTECTED]@my.slot)) On 4/20/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, I don't manage to see if you have already focussed on this point in some previous messages so I post my question: I have a little problem with the S4 style of

[R] parsing arguments of a function

2006-04-20 Thread Thomas Kaliwe
Hi, I have a simple problem writing a function that is to be called like Myfunction( Column1 = low, Column2 = high, Column3 = all, Column4 = all, data = mydata) {. contourplot(z ~ mydata$Column3* mydata$Column3) . } Where Column1 and Column1 are the names of the dataframe mydata. How do I

[R] The contrary of command %in%

2006-04-20 Thread Ghislain Vieilledent
Dear r-list, I've got a data base: HData[1:10,] NumTree Site Species Date Age DBHH IdentTree 11 Queige Spruce 2002 184 49 33.5 Queige 1 22 Queige Fir 2002 NA 5 4.6 Queige 2 33 Queige Fir 2002 25 8 6.6 Queige 3 44 Queige Spruce 2002

Re: [R] The contrary of command %in%

2006-04-20 Thread Gabor Csardi
a - 1:10 a [1] 1 2 3 4 5 6 7 8 9 10 c(1,2,3,11,12,13) %in% a [1] TRUE TRUE TRUE FALSE FALSE FALSE ! c(1,2,3,11,12,13) %in% a [1] FALSE FALSE FALSE TRUE TRUE TRUE Is this it? Gabor On Thu, Apr 20, 2006 at 02:54:39PM +0200, Ghislain Vieilledent wrote: Dear r-list,

Re: [R] The contrary of command %in%

2006-04-20 Thread Liaw, Andy
Just negate the result of %in%; e.g., ! a %in% b Andy From: Ghislain Vieilledent Dear r-list, I've got a data base: HData[1:10,] NumTree Site Species Date Age DBHH IdentTree 11 Queige Spruce 2002 184 49 33.5 Queige 1 22 Queige Fir 2002 NA 5 4.6

Re: [R] The contrary of command %in%

2006-04-20 Thread Christos Hatzis
A flexible way for doing this is to define logical vectors for the types of samples that you want to include or exclude. You can then use logical negation to select the complementary set: inSet1 - HData$H 1.3 inSet2 - HData$H 8 Hdata$DBH 20 HDataPart1 - Hdata[!inSet1, ] HDataPart2 -

[R] Count Unique Rows/Values

2006-04-20 Thread Sachin J
Hi, I have a dataset which has both numeric and character values with dupllicates. For example: 155 A 138 A 138 B 126 C 126 D 123 A 103 A 103 B 143 D 111 C 111 D 156 C How can I count the number of unqiue entries without counting duplicate entries. Also

Re: [R] Count Unique Rows/Values

2006-04-20 Thread Liaw, Andy
This might help: x - read.table(clipboard, colClasses=c(numeric, character)) (x.unique - lapply(x, unique)) $V1 [1] 155 138 126 123 103 143 111 156 $V2 [1] A B C D sapply(x.unique, length) V1 V2 8 4 Andy From: Sachin J Hi, I have a dataset which has both numeric and

Re: [R] Bootstrap error message: Error in statistic(data, origina l, ...) : unused argument(s) ( ...)

2006-04-20 Thread Liaw, Andy
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Sent: Thursday, April 20, 2006 3:50 AM To: R-help@stat.math.ethz.ch Subject: [R] Bootstrap error message: Error in statistic(data, original, ...) : unused argument(s) ( ...) [Broadcast]

[R] (Fwd) Re: Breakdown a number

2006-04-20 Thread Petr Pikal
--- Forwarded message follows --- From: Petr Pikal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject:Re: [R] Breakdown a number Date sent: Thu, 20 Apr 2006 17:22:03 +0200 Hi try this fff-function(x,breaks=c(5,10)) { if

[R] Mutually Orthogonal Latin Squares

2006-04-20 Thread Jinsong Zhao
Hi all, The package crossdes could contruct a complete sets of mutually orthogonal latin squares. The construction works for prime powers only. I hope to know whether there is a way to construct a mutually orthogonal Lation square for 10 or other numbers that could not be prime powers.

Re: [R] Count Unique Rows/Values

2006-04-20 Thread Sachin J
Hi, This one is not working for me. It is listing all the rows instead of unique ones. My dataset has 30 odd rows and following is the resulting o/p [[308313]] [1] 126 [[308314]] [1] 126 [[308315]] [1] 126 [[308316]] [1] 126 [[308317]] [1] 126 [[308318]] [1] 126

Re: [R] Count Unique Rows/Values

2006-04-20 Thread Liaw, Andy
From:Sachin J Hi, This one is not working for me. It is listing all the rows instead of unique ones. My dataset has 30 odd rows and following is the resulting o/p [[308313]] [1] 126 [[308314]] [1] 126 [[308315]] [1] 126 [[308316]] [1] 126 [[308317]] [1] 126

Re: [R] Count Unique Rows/Values

2006-04-20 Thread Sachin J
Thanks Andy. That works. Sachin Liaw, Andy [EMAIL PROTECTED] wrote: From:Sachin J Hi, This one is not working for me. It is listing all the rows instead of unique ones. My dataset has 30 odd rows and following is the resulting o/p [[308313]] [1] 126 [[308314]] [1] 126

Re: [R] Count Unique Rows/Values

2006-04-20 Thread Sachin J
But it is not giving me the list of unique elements. Count works fine. Sachin Liaw, Andy [EMAIL PROTECTED] wrote: From:Sachin J Hi, This one is not working for me. It is listing all the rows instead of unique ones. My dataset has 30 odd rows and following is the resulting

Re: [R] Bootstrap error message: Error in statistic(data, origina l, ...) : unused argument(s) ( ...)

2006-04-20 Thread Michael
btw, if you change myFun to any R internal function, such as cov, or corr, it can run successfully... On 4/20/06, Michael [EMAIL PROTECTED] wrote: Andy, I've noticed there should be a weight or frequency somewhere... but my function does not need it. I have tried to cheat it by declareing

Re: [R] there is no xls reader in R?

2006-04-20 Thread Gabor Grothendieck
Just one other thought. There is a command line program called xlHtml that you can find via google that will convert xls files to csv and its used like this assuming you have placed it somewhere in your path: read.csv(pipe(xlHtml -te -xc:1-10 -csv myfile.xls)) Its handy since its just a

[R] nlminb( ) : one compartment open PK model

2006-04-20 Thread Greg Tarpinian
All, I have been able to successfully use the optim( ) function with L-BFGS-B to find reasonable parameters for a one-compartment open pharmacokinetic model. My loss function in this case was squared error, and I made no assumptions about the distribution of the plasma values. The model

Re: [R] Bootstrap error message: Error in statistic(data, origina l, ...) : unused argument(s) ( ...) [Broadcast]

2006-04-20 Thread Liaw, Andy
I quoted the relevant part of the documentation for you. Have you actually try to read what it says? Sure, you don't get any error, but have you checked whether any bootstrapping was actually done? Most of those functions are generics, thus having the ... argument that can take anything.

[R] smooth the ecdf plots

2006-04-20 Thread Linda Lei
Hi All, I have codes as follows to get the ecdf plots: day.hos2-c(6,4,6,6,4,6,5,4,7,5,6,6,8,6,17,9,8,4,6,3,5,8,7,12,5,10,6,4,6 ,13,7,6,6,25,4,9,96,6,6,6,6,9,4,5,5,4,10,5,7,6) day.hos3-c(5,6,7,6,4,5,6,6,6,6,19,7,5,9,8,8,7,5,6,20,40,5,8,7,7,5,6,13, 11,9,4,6,9,16,6,7,6)

Re: [R] smooth the ecdf plots

2006-04-20 Thread Berton Gunter
Better idea: Compare directly. ?qqplot -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning process. - George E. P. Box -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [R] there is no xls reader in R?

2006-04-20 Thread Dirk Eddelbuettel
On Thu, Apr 20, 2006 at 12:29:58PM -0400, Gabor Grothendieck wrote: Just one other thought. There is a command line program called xlHtml that you can find via google that will convert xls files to csv and its used like this assuming you have placed it somewhere in your path:

[R] Missing p-values using lmer()

2006-04-20 Thread Amelie LESCROEL
Hello, I’m trying to perform a REML analysis using the lmer() function (lme4 package). Well, it seems to work well, except that I’m not getting any p-value (see example below). Can someone tell me what I did wrong? Thanks for your help, Amélie library(gdata) dive -

Re: [R] [Q] Bayeisan Network with the deal package

2006-04-20 Thread Spencer Graves
Thanks for providing such a simple, complete example. I've never used deal before, but a few minutes with your example led me to something that might help you: First, the documentation for localprior says, x: an object of class 'node' or 'network'. That information led me

Re: [R] Missing p-values using lmer()

2006-04-20 Thread Doran, Harold
You didn't do anything wrong, lmer doesn't give them. And, for good reason. I've been a bit indoctrinated by D. Bates, so let me share what I've learned. With simple analysis of variance models with simple error structures, it is known that the ratio of the variances follow and F distribution.

Re: [R] 3D pie

2006-04-20 Thread Michael A. Miller
COMTE == COMTE Guillaume [EMAIL PROTECTED] writes: I know it isn't the best way to represent data, but people are sometimes more interested by the look and feel than by the accuracy of the results... If they aren't intersted in the results, why not just print some random 3D pie

Re: [R] Missing p-values using lmer()

2006-04-20 Thread Spencer Graves
Hi, Harold: Am I correct that the tool currently preferred for estimating p-values for lmer is mcmcsamp? Amélie: My favorite tool for exploring the archives is 'RSiteSearch'. You can also get to it via www.r-project.org, but the last time I tried to copy a web address to paste in

Re: [R] smooth the ecdf plots

2006-04-20 Thread Frank E Harrell Jr
Linda Lei wrote: Hi All, I have codes as follows to get the ecdf plots: day.hos2-c(6,4,6,6,4,6,5,4,7,5,6,6,8,6,17,9,8,4,6,3,5,8,7,12,5,10,6,4,6 ,13,7,6,6,25,4,9,96,6,6,6,6,9,4,5,5,4,10,5,7,6) day.hos3-c(5,6,7,6,4,5,6,6,6,6,19,7,5,9,8,8,7,5,6,20,40,5,8,7,7,5,6,13,

Re: [R] Missing p-values using lmer()

2006-04-20 Thread Doran, Harold
Yes, you're exactly right. You can use the mcmcsamp() function to sample from the posterior of an lmer object. This returns an object of mcmc class and you can do all of your diagnostics using the coda package. -Original Message- From: Spencer Graves [mailto:[EMAIL PROTECTED] Sent:

[R] Conditional Row Sum

2006-04-20 Thread Sachin J
Hi, How can I accomplish this in R. Example: R1 R2 3 101 4 102 3 102 18102 11101 I want to find Sum(101) = 14 - i.e SUM(R1) where R2 = 101 Sum(102) = 25- SUM(R2) where R2 = 102 TIA Sachin

Re: [R] Conditional Row Sum

2006-04-20 Thread Gabor Grothendieck
Using the built in data.frame iris sum each of the first 4 columns for each value of the 5th column. rowsum(iris[,-5], iris[,5]) On 4/20/06, Sachin J [EMAIL PROTECTED] wrote: Hi, How can I accomplish this in R. Example: R1 R2 3 101 4 102 3 102 18102 11101

Re: [R] Conditional Row Sum

2006-04-20 Thread Marc Schwartz (via MN)
On Thu, 2006-04-20 at 11:46 -0700, Sachin J wrote: Hi, How can I accomplish this in R. Example: R1 R2 3 101 4 102 3 102 18102 11101 I want to find Sum(101) = 14 - i.e SUM(R1) where R2 = 101 Sum(102) = 25- SUM(R2)

Re: [R] Conditional Row Sum

2006-04-20 Thread Sachin J
Thanx Marc and Gabor for your help. Sachin Marc Schwartz (via MN) [EMAIL PROTECTED] wrote: On Thu, 2006-04-20 at 11:46 -0700, Sachin J wrote: Hi, How can I accomplish this in R. Example: R1 R2 3 101 4 102 3 102 18 102 11 101 I want to find Sum(101) = 14 - i.e SUM(R1) where

Re: [R] Randomly selecting one row for each factor level [Broadca st]

2006-04-20 Thread Kelly Hildner
This worked for my example data frame but not when I used it on my actual data frame because some of the levels of x have only one element. However, when I replace 'sample' with 'some' (from the car package), it works like a charm! Many thanks to Andy and Gabor for their help! Kelly Liaw,

[R] PCA biplot question

2006-04-20 Thread Cashorali, Tanya
Hi everyone, I'd like to project two pcas onto one device window. I plot my first PCA: biplot(prcomp(t(cerebdevmat)), var.axes=FALSE, cex=c(1,.1), pc.biplot=TRUE) Now I'd like to project the features of another PCA onto this graph. Any suggestions? I know this is easily done in MatLab

Re: [R] Function to approximate complex integral

2006-04-20 Thread Douglas Bates
On 4/19/06, Doran, Harold [EMAIL PROTECTED] wrote: I am writing a small function to approximate an integral that cannot be evaluated in closed form. I am partially successful at this point and am experiencing one small, albeit important problem. Here is part of my function below. This is a