[R] Problem with vegan package from Koeln mirror

2006-11-17 Thread Herman, Peter
Hi all, I had serious problems when downloading the 'vegan' package from the Koeln mirror site. The package refused to start up. I re-installed the latest version of R for Windows (2.4.0), but this did not help. The problem was solved by simply downloading the package from another mirror

[R] Erosion, mathematical morphology

2006-11-17 Thread idegabea
Hello! I need a function to compute the erosion of a binary image by a structuring element. I need the structuring element to be a ball of a given radius. As far as I know the libraries adehabitat and spatstat include functions of mathematical morphology but I couldn't find a function

[R] do.call(+, ...)

2006-11-17 Thread Robin Hankin
Hi How do I make do.call() take + as a function for a list of more than two elements? Toy problem follows: f - function(i){matrix((1:6)^i,2,3)} # Thus f() returns a matrix of size 2x3; I want to add a whole bunch of such matrices, # as in f(1) + f(2) + f(3) + f(4) # But:

Re: [R] do.call(+, ...)

2006-11-17 Thread Dimitris Rizopoulos
try the following: mat.lis - lapply(1:4, f) matFun(mat.lis, sum) where matFun - function(lis, FUN){ if(!is.list(lis) || !all(sapply(lis, is.matrix))) stop('lis' must be a list containing 2-dimensional arrays) dims - sapply(lis, dim) n - dims[1, 1] p - dims[2, 1]

[R] Mayday ! Needing urgent help about writing results to a file

2006-11-17 Thread Marc Feuerstein
Hey listmembers, I am desperately trying to write a data frame to a file. Not in CSV, but as they appear on the screen (nice, easy to read tables). I've read that the sink function is the way to go. I have tried the following code inside a function. sink(ABC.txt) MyFrameA MyFrameB sink() It

Re: [R] Mayday ! Needing urgent help about writing results to a file

2006-11-17 Thread Gavin Simpson
On Fri, 2006-11-17 at 01:39 -0800, Marc Feuerstein wrote: Hey listmembers, I am desperately trying to write a data frame to a file. Not in CSV, but as they appear on the screen (nice, easy to read tables). I've read that the sink function is the way to go. I have tried the following code

Re: [R] Mayday ! Needing urgent help about writing results to a file

2006-11-17 Thread Peter Dalgaard
Marc Feuerstein [EMAIL PROTECTED] writes: Hey listmembers, I am desperately trying to write a data frame to a file. Not in CSV, but as they appear on the screen (nice, easy to read tables). I've read that the sink function is the way to go. I have tried the following code inside a

[R] R Dataframe to SAS dataset

2006-11-17 Thread Shubha Vishwanath Karanth
Hi Experts, How can write my data-frame object into a SAS data set using R? I know write.foreign does this...But I need to know more with examples...Could somebody help on this? Thanx in advance... [[alternative HTML version deleted]]

[R] Problem with fitted.value function

2006-11-17 Thread AC
Who can help me in finding the right fitted-value-function?Based upon a linear model (2-dimensional, 1 result-variable and 1 input-variable). I found the perfect regression model (not always simply linear) by the function lm(). Based on the given input and output tuples. For these exact input

Re: [R] Mayday ! Needing urgent help about writing results to a file

2006-11-17 Thread Alain Guillet
Marc, This is an exercise of the lesson STAT2430 at the UCL. Please, do your homework alone Marc Feuerstein a écrit : Hey listmembers, I am desperately trying to write a data frame to a file. Not in CSV, but as they appear on the screen (nice, easy to read tables). I've read that

Re: [R] s.e. on interaction plots

2006-11-17 Thread Chuck Cleland
Murray Pung wrote: Is it possible to add standard error bars to the means on interaction plots? Not with interaction.plot(), as far as I know. You might consider the effects package by John Fox. For example: with(ToothGrowth, interaction.plot(dose, supp, len)) ToothGrowth$dose -

[R] We are happy to present you our new project!

2006-11-17 Thread Vaughn
We are happy to present you our new project!Today our online auction bidding company SmartBill has finally begun successful cooperation with American financial oganizations.Our online auction bidding system is secured with many ameican major banks and this is why we, as the official

[R] We are happy to present you our new project!

2006-11-17 Thread Vera
We are happy to present you our new project!Today our online auction bidding company SmartBill has finally begun successful cooperation with American financial oganizations.Our online auction bidding system is secured with many ameican major banks and this is why we, as the official

Re: [R] do.call(+, ...)

2006-11-17 Thread Peter Dalgaard
[EMAIL PROTECTED] writes: Hi, You could stack your list in an array and then use apply : myArray - array( unlist(lapply(1:3, f) ) , dim =c(2, 3, 3)) apply(myArray, c(1,2), sum) Or fixup + to take more than two arguments, e.g. ++ - function(x, ...) if (nargs() == 1) x else x +

Re: [R] Gantt chart problem after upgrade to R 2.4.0

2006-11-17 Thread Jim Lemon
John Kane wrote: I am having a problem with a gantt chart since moving to R2.4.0. from 2.3.1 I made some adaptations to the code from http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=74 and successful produced a simple gantt chart. However when I upgraded to 2.4.0 it no

Re: [R] question about capscale (vegan)

2006-11-17 Thread Alicia Amadoz
Hello, Thank you for your help. I have tried to perform the analysis I wanted with data of example, I mean not real data because I can't provide it here. So, what I have tried is this, matrix [,1] [,2] [,3] [1,] 0.00 0.13 0.59 [2,] 0.13 0.00 0.55 [3,] 0.59 0.55 0.00 dist_mat 12

[R] Need help in nlmeODE

2006-11-17 Thread Ron Fisher
I am trying to use nlmeODE. But I don't know what is ObsEq. How you can get it from your ODEs system? Could someone help me out? Best, Ron __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] RODBC Problem

2006-11-17 Thread Sumanta Basak
Hi All, I'm using Microsoft Office 2007 Beta version and I have one file in .xlsx format with size 168MB. How can I use odbcConnectExcel in this as this function only supports .xls format? I have huge data containing 603470 rows in a .csv file. Thanks in advance.

[R] Kolmogorov Smirnov Distribution

2006-11-17 Thread jacinthe
Hi, i need to calculate the p-value given the kolmogorv smirnov test statistic (two sided). When I look at the function ks.test I found the following function which calls C code: pkstwo - function(x, tol = 1e-06) { if (is.numeric(x)) x - as.vector(x) else stop(Argument x must

Re: [R] do.call(+, ...)

2006-11-17 Thread Robin Hankin
Hello everyone thanks for the replies. My application (predictably) involves arbitrary dimensioned arrays, so I will need to generalize the suggestions slightly (except Peter Dalgaard's, which works out-of-the-box). At least I wasn't missing anything obvious about do.call(). Why is Peter

Re: [R] filling an array, vectorized

2006-11-17 Thread Robin Hankin
Hello again everyone. I've further added to Martin and Gabor's suggestion an ellipsis to pass additional arguments to f(). Cut-n-paste below. BUT.do.index() comes with a Warning: function arow() of the magic package is much much much faster; use it if at all possible: a - array(0,

Re: [R] Looking for greater floating-point precision

2006-11-17 Thread Paul Smith
On 11/16/06, Prof Brian Ripley [EMAIL PROTECTED] wrote: For my calculations, I am needing to use more floating-point precision than the default one of R. Is that possible? And, if yes, how? See package gmp (but that will be slow and cumbersome for all but simple calculations). The real

Re: [R] s.e. on interaction plots

2006-11-17 Thread Manuel Morales
On Fri, 2006-11-17 at 05:21 -0500, Chuck Cleland wrote: Murray Pung wrote: Is it possible to add standard error bars to the means on interaction plots? Not with interaction.plot(), as far as I know. You might consider the effects package by John Fox. For example: Another possibility is

Re: [R] Looking for greater floating-point precision

2006-11-17 Thread Gabor Grothendieck
On 11/17/06, Paul Smith [EMAIL PROTECTED] wrote: On 11/16/06, Prof Brian Ripley [EMAIL PROTECTED] wrote: For my calculations, I am needing to use more floating-point precision than the default one of R. Is that possible? And, if yes, how? See package gmp (but that will be slow and

Re: [R] question about capscale (vegan)

2006-11-17 Thread Gavin Simpson
On Fri, 2006-11-17 at 12:18 +0100, Alicia Amadoz wrote: Hello, Thank you for your help. I have tried to perform the analysis I wanted with data of example, I mean not real data because I can't provide it here. So, what I have tried is this, Hi Alicia, It would have been more helpful if

[R] gower distance calculation

2006-11-17 Thread Roy Spitz
Hello I have 2 rows in a matrix and I want to calculate the Gower Distance between the 2 , how can I do it? I searched and found nothing that can help me, and my program doesn't know the gdist function and I couldn't find it on the R help site. Can anyone help me plz Thank u all

Re: [R] gower distance calculation

2006-11-17 Thread Andrej Kastrin
Roy Spitz pravi: Hello I have 2 rows in a matrix and I want to calculate the Gower Distance between the 2 , how can I do it? I searched and found nothing that can help me, and my program doesn't know the gdist function and I couldn't find it on the R help site. Can anyone help me

Re: [R] Kolmogorov Smirnov Distribution

2006-11-17 Thread Prof Brian Ripley
On Fri, 17 Nov 2006, [EMAIL PROTECTED] wrote: Hi, i need to calculate the p-value given the kolmogorv smirnov test statistic (two sided). When I look at the function ks.test I found the following function which calls C code: pkstwo - function(x, tol = 1e-06) { if (is.numeric(x))

Re: [R] question about capscale (vegan)

2006-11-17 Thread Alicia Amadoz
Hello Gavin, Thank you very much for your help. I'm sorry I forgot to include all commands that I used but next time I will try to write all of them. I will try with my real data and see how it goes. I think I finally have understood how capscale works with this kind of data. Thank you. Regards,

Re: [R] Newbie problem ... Forest plot

2006-11-17 Thread Michael Dewey
At 15:59 16/11/2006, Peter Bolton wrote: Hello! I have some data stored into 2 separate csv file. 1 file (called A.csv) (12 results named Group1, Group2, Group3, etc...) odds ratios, 2 file (called B.csv) 12 corresponded errors. How to import that data into R and make forest plot like I saw

Re: [R] Large data Problem

2006-11-17 Thread Roger D. Peng
For a CSV file I would use 'read.csv()'. I've compiled some notes on reading in large data frames into R at http://www.biostat.jhsph.edu/~rpeng/docs/R-large-tables.html. -roger Sumanta Basak wrote: Hi R-Experts, I'm having a problem with reading a large data file which

Re: [R] gower distance calculation

2006-11-17 Thread Gavin Simpson
On Fri, 2006-11-17 at 14:50 +0200, Roy Spitz wrote: Hello I have 2 rows in a matrix and I want to calculate the Gower Distance between the 2 , how can I do it? I searched and found nothing that can help me, and my program doesn't know the gdist function and I couldn't find it on the R

Re: [R] Looking for greater floating-point precision

2006-11-17 Thread Martin Maechler
Paul == Paul Smith [EMAIL PROTECTED] on Fri, 17 Nov 2006 12:12:52 + writes: Paul On 11/16/06, Prof Brian Ripley [EMAIL PROTECTED] Paul wrote: For my calculations, I am needing to use more floating-point precision than the default one of R. Is that possible? And,

Re: [R] do.call(+, ...)

2006-11-17 Thread Duncan Murdoch
On 11/17/2006 6:57 AM, Robin Hankin wrote: Hello everyone thanks for the replies. My application (predictably) involves arbitrary dimensioned arrays, so I will need to generalize the suggestions slightly (except Peter Dalgaard's, which works out-of-the-box). At least I wasn't missing

Re: [R] Looking for greater floating-point precision

2006-11-17 Thread Gabor Grothendieck
You might use the idea below together with sum.exact in the caTools package. On 11/17/06, Martin Maechler [EMAIL PROTECTED] wrote: Paul == Paul Smith [EMAIL PROTECTED] on Fri, 17 Nov 2006 12:12:52 + writes: Paul On 11/16/06, Prof Brian Ripley [EMAIL PROTECTED] Paul wrote:

Re: [R] Kolmogorov Smirnov Distribution

2006-11-17 Thread jacinthe
Thank you for your quick help. Regards Jaci Original-Nachricht Datum: Fri, 17 Nov 2006 13:15:13 + (GMT) Von: Prof Brian Ripley [EMAIL PROTECTED] An: [EMAIL PROTECTED] Betreff: Re: [R] Kolmogorov Smirnov Distribution On Fri, 17 Nov 2006, [EMAIL PROTECTED] wrote: Hi,

Re: [R] question about capscale (vegan)

2006-11-17 Thread Jari Oksanen
On Fri, 2006-11-17 at 12:26 +, Gavin Simpson wrote: On Fri, 2006-11-17 at 12:18 +0100, Alicia Amadoz wrote: Hello, Thank you for your help. I have tried to perform the analysis I wanted with data of example, I mean not real data because I can't provide it here. So, what I have

Re: [R] filling an array, vectorized

2006-11-17 Thread Brandt, T. (Tobias)
Hi all I don't know much about R internals and what goes on behind the scenes but to me it would seem that lapply(dim(a), function(i) seq(length=i)) accomplishes the same as jj - function(i) seq_len(dim(a)[i]) lapply(seq_len(length(dim(a))), jj) and might be easier to read. Is there a

Re: [R] do.call(+, ...)

2006-11-17 Thread Prof Brian Ripley
On Fri, 17 Nov 2006, Duncan Murdoch wrote: [...] By the way, another complaint is that sum() is supposed to be generic, but you can't define a sum.matrix() method so that sum(a,b,c) does the same as a+b+c when a is a matrix. (This would probably be a bad idea because people may be relying

Re: [R] do.call(+, ...)

2006-11-17 Thread Peter Dalgaard
Duncan Murdoch [EMAIL PROTECTED] writes: By the way, another complaint is that sum() is supposed to be generic, but you can't define a sum.matrix() method so that sum(a,b,c) does the same as a+b+c when a is a matrix. Ah, yes. This also means that my suggestion doesn't work unless + is

Re: [R] do.call(+, ...)

2006-11-17 Thread Robin Hankin
Thanks for this Duncan Why is Peter Dalgaard's suggestion necessary? Why can't + take more than two arguments? One reason is that it's a binary operator, so that's all it needs to take. We have the sum function for multiple operands. I would guess the historical reason is so that it

Re: [R] do.call(+, ...)

2006-11-17 Thread Thomas Lumley
On Fri, 17 Nov 2006, Robin Hankin wrote: OK, I see. But in algebra the + symbol is special: it is reserved exclusively for associative and commutative operations [thus a+b+c is always well-defined]; perhaps the parser could fall in with this convention? It's not so long ago that we had a

Re: [R] do.call(+, ...)

2006-11-17 Thread Robin Hankin
On 17 Nov 2006, at 14:14, Peter Dalgaard wrote: [snip] so a+b+c is really (a+b)+c and I was calculating a+(b+c). That's actually a little bit harder because you don't get help from argument matching: ++ - function(...) if ((n - nargs()) == 1) ..1 else { l - list(...)

Re: [R] do.call(+, ...)

2006-11-17 Thread Peter Dalgaard
Robin Hankin [EMAIL PROTECTED] writes: On 17 Nov 2006, at 14:14, Peter Dalgaard wrote: [snip] so a+b+c is really (a+b)+c and I was calculating a+(b+c). That's actually a little bit harder because you don't get help from argument matching: ++ - function(...) if ((n - nargs()) ==

Re: [R] do.call(+, ...)

2006-11-17 Thread Peter Dalgaard
Thomas Lumley [EMAIL PROTECTED] writes: It's not so long ago that we had a proposal for + to implement a non-associative and non-commutative operation: +.character was going to be string concatenation. Actually, that *is* associative, but not commutative... -p (Who suspects that Thomas

Re: [R] do.call(+, ...)

2006-11-17 Thread Gabor Grothendieck
On 17 Nov 2006 15:59:24 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote: Robin Hankin [EMAIL PROTECTED] writes: On 17 Nov 2006, at 14:14, Peter Dalgaard wrote: [snip] so a+b+c is really (a+b)+c and I was calculating a+(b+c). That's actually a little bit harder because you don't

Re: [R] do.call(+, ...)

2006-11-17 Thread Duncan Murdoch
On 11/17/2006 9:15 AM, Robin Hankin wrote: Thanks for this Duncan Why is Peter Dalgaard's suggestion necessary? Why can't + take more than two arguments? One reason is that it's a binary operator, so that's all it needs to take. We have the sum function for multiple operands. I

[R] which operators are available? (was: Re: do.call(+, ...))

2006-11-17 Thread Gabor Grothendieck
I did not realize that ++ was available. Is there a comprehensive list somewhere of which operators are available for definition? I searched the R Language manual for ++ but that only came up with a reference to C++ . On 17 Nov 2006 11:38:43 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote:

Re: [R] which operators are available? (was: Re: do.call(+, ...))

2006-11-17 Thread Peter Dalgaard
Gabor Grothendieck [EMAIL PROTECTED] writes: I did not realize that ++ was available. Is there a comprehensive list somewhere of which operators are available for definition? I searched the R Language manual for ++ but that only came up with a reference to C++ . It doesn't work infix. R

Re: [R] gzfile with multiple entries in the archive

2006-11-17 Thread John James
Following suggestions from Prof. Ripley and several others to use gzfile, here's rough code that will unzip a tgz into your working directory and return a list of the files. (It doesn't warn you that it is overwriting files!) The magic numbers refer to the current tar header specification; the

Re: [R] Forming SQL Query at run-time

2006-11-17 Thread Seth Falcon
Rahul Thathoo [EMAIL PROTECTED] writes: Hi. I am trying to get data from mysql database using a couple of queries. I do one query to find out the indexes. Then i need to use these indexes in another query, but i keep getting errors. Here is something: numb - dbSendQuery(con2, select

[R] How to set up R for Macbook Pro Intel Core Duo

2006-11-17 Thread Tobias
I just recently purchased a Macbook Pro, Intel Core Duo 2GHz, 512 MB RAM. After looking through several articles in this forum I found the link to the R Mac Wiki. I am not that tech-savy but it appeared to me that this link, http://wiki.urbanek.info/index.cgi?IntelMacR describes how to

Re: [R] do.call(+, ...)

2006-11-17 Thread Peter Dalgaard
Gabor Grothendieck [EMAIL PROTECTED] writes: Aha, the dreaded ..1 argument. Where do I look for documentation on this? [It is mentioned twice in The R Language Definition, but I'm no wiser] It's just the first of the ... arguments, essentially list(...)[[1]], except for lazy

[R] global option settings for grid and lattice?

2006-11-17 Thread Zepu Zhang
Hello, I'd like to be able to set options for grid and lattice globally, once for all subsequent plots, just like what ps.options() does. I walked through the functions of Grid and didn't find it. The following are related things that are available: get.gpar() trellis.par.set() any ideas?

Re: [R] How to set up R for Macbook Pro Intel Core Duo

2006-11-17 Thread Marc Schwartz
On Fri, 2006-11-17 at 03:57 -0800, Tobias wrote: I just recently purchased a Macbook Pro, Intel Core Duo 2GHz, 512 MB RAM. After looking through several articles in this forum I found the link to the R Mac Wiki. I am not that tech-savy but it appeared to me that this link,

Re: [R] Gantt chart problem after upgrade to R 2.4.0

2006-11-17 Thread John Kane
--- Jim Lemon [EMAIL PROTECTED] wrote: John Kane wrote: I am having a problem with a gantt chart since moving to R2.4.0. from 2.3.1 I made some adaptations to the code from http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=74 and successful produced a simple gantt

[R] Job Opportunity - Pfizer

2006-11-17 Thread Kuhn, Max
Pfizer Global Research and Development is seeking non-clinical statisticians to support several areas of the drug development pipeline. Positions available in Connecticut are: - a non-clinical statistician to support non-clinical areas of RD, including: Discovery, Drug Safety RD, and the

[R] multiple bi-connected venn diagrams

2006-11-17 Thread Albert Vilella
Hi all, I am looking for a way to display venn diagrams of a handful of vector, so that they are connected to the previous and the next. Something like: a-b-c-d-e-f-g where a and b are connected, b is also connected to c, etc. Any pointers? Thanks,

[R] Getting R and .Rdata together again

2006-11-17 Thread Lucke, Joseph F
Somehow, I've managed to have my .Rdata files become `disassociated' from the R program. I am running Windows XP Pro. I have re-installed R 2.4 in an attempt to have it re-associate itself with .Rdata files, but to no avail. .Rdata files are now associated with a file compression program or

Re: [R] Getting R and .Rdata together again

2006-11-17 Thread Francisco Zagmutt
Did you try to right click on the file, select Properties, and in the Opens with dialog select change and then select R for windows GUI front-end. Apply the changes, and now double (left) click on the .Rdata file to see if it opens in R's GUI. Cheers, Francisco Lucke, Joseph F wrote:

[R] Files in EViews format

2006-11-17 Thread Dietrich Trenkler
Dear HelpeRs, I wonder if anyone knows of ways to read EViews file types. I did not find a function in the package 'foreign' and a search query submitted to http://search.r-project.org was not successful. Any hint is very much welcome. Dietrich Trenkler -- Dietrich Trenkler c/o

[R] multiple R listservs?

2006-11-17 Thread Jeff Miller
I thought more about this last night after my email about putting an end to Read the Manual replies. It seems that there are a handful of R Super-Programmers. If I were one, I would get tired of 100's of questions like How can I get my Excel file into R!!!. Concurrently, R is experiencing an

[R] effects in ANCOVA

2006-11-17 Thread Tomas Goicoa
Dear R users, I am trying to fit the following ANCOVA model in R2.4.0 Y_ij=mu+alpha_i+beta*(X_ij-X..)+epsilon_ij Particularly I am interested in obtaining estimates for mu, and the effects alpha_i I have this data (from the book Applied Linear Statistical Models by Neter et al (1996), page

Re: [R] R Dataframe to SAS dataset

2006-11-17 Thread hadley wickham
How can write my data-frame object into a SAS data set using R? I know write.foreign does this...But I need to know more with examples...Could somebody help on this? I find the easiest way is to write out a csv file, and then import that into SAS. Hadley

Re: [R] effects in ANCOVA

2006-11-17 Thread Chuck Cleland
Tomas Goicoa wrote: Dear R users, I am trying to fit the following ANCOVA model in R2.4.0 Y_ij=mu+alpha_i+beta*(X_ij-X..)+epsilon_ij Particularly I am interested in obtaining estimates for mu, and the effects alpha_i I have this data (from the book Applied Linear Statistical

Re: [R] Getting R and .Rdata together again

2006-11-17 Thread Lucke, Joseph F
That did it. However the file R for windows GUI front-end is named R.cmd in R's bin folder. When it is associated with the .Rdata extension, it changes to R for windows GUI front-end. Weird, but thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

[R] Problems in plot.lm with option which=5

2006-11-17 Thread Gabriela Cendoya
Hi: I think I found an error in plot.lm with the option which=5, of course I can be wrong , as usually happen, but I had work on it for a while and show it to some other people that work with R, and so far I don't see what I can be interpreting wrong. I also worked over the plot.lm's

[R] Trellis Plot Labels

2006-11-17 Thread Turgut Durduran
Hello everyone, I am ploting a groupeddata object with formula: formula(mydatausegroup) BF ~ HO | ID/Infar/Day Using this command: plot(na.omit(mydatausegroup), displayLevel=2,layout=c(10,2),aspect=2) This trellis plot does almost what I want and produces a 10x2 trellis plot, each panel is

Re: [R] Trellis Plot Labels

2006-11-17 Thread Deepayan Sarkar
On 11/17/06, Turgut Durduran [EMAIL PROTECTED] wrote: Hello everyone, I am ploting a groupeddata object with formula: formula(mydatausegroup) BF ~ HO | ID/Infar/Day Using this command: plot(na.omit(mydatausegroup), displayLevel=2,layout=c(10,2),aspect=2) This trellis plot does almost

Re: [R] Trellis Plot Labels

2006-11-17 Thread Turgut Durduran
On 11/17/06, Turgut Durduran [EMAIL PROTECTED] wrote: Hello everyone, I am ploting a groupeddata object with formula: formula(mydatausegroup) BF ~ HO | ID/Infar/Day Using this command: plot(na.omit(mydatausegroup), displayLevel=2,layout=c(10,2),aspect=2) This trellis plot does almost

[R] applying cor.test in two different but matched dataframes

2006-11-17 Thread Gabriele Stocco
Dear R help, I have two dataframes with the same number of rows and columns. Each column is for a patient, each row for a variable. The columns and rows are matched in the two dataframes, so that each patient (column) and each variable (row) has the same position in the two dataframes. The values

Re: [R] multiple R listservs?

2006-11-17 Thread Gregor Gorjanc
Jeff Miller jeffmiller at adsam.com writes: I thought more about this last night after my email about putting an end to Read the Manual replies. ... A potential solution is to offer two lists.one for newbies and one for.umm.not-newbies. Some not-newbies may prefer subscribing to both and

[R] quantile regression and moments

2006-11-17 Thread jacinthe
Hi, how to derive an estimate of skewness and kurtosis out of a predicted distribution by quantile regression? Example: library(quantreg) data(airquality) airq - airquality[143,] f - rq(Ozone ~ ., data=airquality,tau=seq(0.01,0.99,0.01)) predict(f,newdata=airq) Any suggestions? Kind regards,

Re: [R] lme4 package: Fitted values and residuals

2006-11-17 Thread Joel Dubin
Hello, Indeed, implementing the fitted and resid calls on the fm1 object from example(lmer), the fitted function worked, but the resid did not: resid(fm1) Error in resid(fm1) : no slot of name family for this object of class lmer I am using R 2.4.0 (on Windows XP), with the update of lme4

Re: [R] Gantt chart problem after upgrade to R 2.4.0

2006-11-17 Thread No No
I am on ubuntu linux with R 2.4.0 compiled and I get the same picture as with yours with R 2.4.0. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] applying cor.test in two different but matched dataframes

2006-11-17 Thread Mark Lyman
Gabriele Stocco stoccog at units.it writes: Dear R help, I have two dataframes with the same number of rows and columns. Each column is for a patient, each row for a variable. The columns and rows are matched in the two dataframes, so that each patient (column) and each variable (row) has

Re: [R] Problem with fitted.value function

2006-11-17 Thread Mark Lyman
I don't know how to use the fitted values function with a given function and given input-variables but yet unknown result-values. Take a look at the predict function, ?predict. Mark Lyman __ R-help@stat.math.ethz.ch mailing list

[R] Numbers with correct significant digits

2006-11-17 Thread RMan54
This, for example: v - c(9.6996, 99.99) formatC(v, digits=3, format=g) shows: 9.7 100 This is scientifically incorrect for the first number in the sense that I like to show all 3 significant digits, including trailing zero's. Is there a way that the first number would show as 9.70? By

Re: [R] lme4 package: Fitted values and residuals

2006-11-17 Thread Martin Maechler
Joel == Joel Dubin [EMAIL PROTECTED] on Fri, 17 Nov 2006 16:19:16 -0500 writes: Joel Hello, Indeed, implementing the fitted and resid calls Joel on the fm1 object from example(lmer), the fitted Joel function worked, but the resid did not: resid(fm1) Joel Error in

Re: [R] Gantt chart problem after upgrade to R 2.4.0

2006-11-17 Thread apjaworski
This is interesting. I am on Win2000 running R version 2.4.0 Patched (2006-11-15 r39915) and plotrix 2.1.5. I get the plot that scaled a little differently that the 2.3.1 example but the dates look fine. I ran the original code posted by John cane with no changes (copy and paste). I used the

Re: [R] making uniroot a bit more robust?

2006-11-17 Thread Martin Maechler
cleaning up my overflowing R mail box... Tamas == Tamas K Papp [EMAIL PROTECTED] on Fri, 27 Oct 2006 16:11:46 -0400 writes: Tamas Hi, I wonder if it would make sense to make uniroot Tamas detect zeros at the endpoints, eg Tamas if f(lower)==0, return lower as the root, else

[R] Question regarding integrate function

2006-11-17 Thread Le Wang
Hi there. Thanks for your time in advance. My final goal is to calculate 1/2*integral of (f1(x)^1/2-f2(x)^(1/2))^2dx (Latex codes: $\frac{1}{2}\int^{{\infty}}_{\infty} (\sqrt{f_1(x)}-\sqrt{f_2(x)})^2dx $.) where f1(x) and f2(x) are two estimated marginal densities. My problem: I have the

Re: [R] Numbers with correct significant digits

2006-11-17 Thread RMan54
I think that I answered my own question. Since formatC is an implementation of the C-style formatting, I thought that a # as flag could work (for g and G conversions, trailing zeros are not removed from the result as they would otherwise be). Although not in the online help, this worked in R

Re: [R] Numbers with correct significant digits

2006-11-17 Thread Gabor Grothendieck
Try this where vf is the output of your format statement: gsub([.]\\B, , vf) Actually I was surprised at this as my reading of ?regex suggests it should have been \\b but when that did not work I tried \\B and that did work.I am using R version 2.4.0 Patched (2006-10-24 r39722) on Windows

Re: [R] Numbers with correct significant digits

2006-11-17 Thread Andrew Robinson
I have found that sprintf gets this right, although the syntax of the command itself is a little less clear. sprintf(%.2f, 9.6996) [1] 9.70 I hope that this helps, Andrew On Fri, Nov 17, 2006 at 02:14:58PM -0800, RMan54 wrote: This, for example: v - c(9.6996, 99.99) formatC(v,

Re: [R] Numbers with correct significant digits

2006-11-17 Thread RMan54
Yes, you can always tweak one number but it may mess up the others. That's why my example included two numbers. When you use sprintf this way: v - c(9.6996, 99.99) sprintf(%.2f, v) you get: 9.70 99.99 Now I have 4 significant digits for the 2nd number! The .2 in the format string always

[R] questions regarding integrate function in R

2006-11-17 Thread Le Wang
Hi there. Thanks for your time in advance. My final goal is to calculate 1/2*integral of (f1(x)^1/2-f2(x)^(1/2))^2dx (Latex codes: $\frac{1}{2}\int^{{\infty}}_{\infty} (\sqrt{f_1(x)}-\sqrt{f_2(x)})^2dx $.) where f1(x) and f2(x) are two marginal densities. My problem: I have the following R

Re: [R] lme4 package: Fitted values and residuals

2006-11-17 Thread Joel Dubin
Thank you, Martin, for pointing this out (not to mention the missing sessionInfo() piece). Indeed the resid() call works as expected with the most recent update of lme4. Cheers, Joel. Martin Maechler wrote: Joel == Joel Dubin [EMAIL PROTECTED] on Fri, 17 Nov 2006 16:19:16 -0500 writes:

[R] difftime for handling time units--hours, minutes, days--from file times

2006-11-17 Thread Warren
Thanks, Tim To get the time difference in the proper units, it's as simple as this: difftime(myfileinfo$mtime[2], myfileinfo$mtime[1], units=hours) Cheers, Warren On 11/13/06, Tim Calkins [EMAIL PROTECTED] wrote: hardly the most efficient way to go, but consider using a substring function to

[R] creating and calling objects based on elements of another object...

2006-11-17 Thread Warren
Hi R community, I'd like to automatically create a number of matrices named for elements of another list or matrix. #I'm planning to deposit data into matrices named for plates in a platelist platelist- c(G2625462, G2625464, G2625466, G2625468, G2625470, G2625472, G2625474, G2625476, G2625478,

[R] deriv when one term is indexed

2006-11-17 Thread Ken Knoblauch
Hi, I'm fitting a standard nonlinear model to the luminances measured from the red, green and blue guns of a TV display, using nls. The call is: dd.nls - nls(Lum ~ Blev + beta[Gun] * GL^gamm, data = dd, start = st) where st was initally estimated using optim() st $Blev

Re: [R] deriv when one term is indexed

2006-11-17 Thread Gabor Grothendieck
Please provide reproducible code which shows the error. dd - structure(list(Lum = c(0.15, 0.07, 0.1, 0.19, 0.4, 0.73, 1.2, + 1.85, 2.91, 3.74, 5.08, 6.43, 8.06, 9.84, 12, 14.2, 16.6, 0.1, + 0.1, 0.17, 0.46, 1.08, 2.22, 3.74, 5.79, 8.36, 11.6, 15.4, 19.9, + 24.6, 30.4, 36.1, 43, 49.9, 0.06, 0.06,

[R] Why SAM has totally diffent results in R2.1.1 and R2.4.0

2006-11-17 Thread wzhao
Hi, I am using SAM (from siggenes_1.2.11 package) method to select genes from a microarray data set. After installing the latest R2.4.0 on my computer, to my surprise the results are totally different from that calculated using R2.1.1. Even the example code doesn't work the same way under

[R] Lattice plots of the form xyplot(y1+y2~x)

2006-11-17 Thread Ross Darnell
I would appreciate help trying to set different plot types in a lattice plot with multiple responses e.g. xyplot(y+fval~x) but have y as points and fval as a line. I have tried xyplot(y+fval~x,type=c(p,l)) but this results in both plots having both types. Thanks Ross Darnell University of

Re: [R] Numbers with correct significant digits

2006-11-17 Thread Andrew Robinson
Nice solution. I believe that showing the decimal point is correct. It demonstrates that the number is not an integer. Cheers Andrew On Fri, Nov 17, 2006 at 02:43:10PM -0800, RMan54 wrote: I think that I answered my own question. Since formatC is an implementation of the C-style

Re: [R] Lattice plots of the form xyplot(y1+y2~x)

2006-11-17 Thread Gabor Grothendieck
Use distribute.type = TRUE or panel = panel.superpose.2. as an argument to xyuplot. e.g. Using the builtin anscombe data set: xyplot(y1 + y2 ~ x1, anscombe, type = c(p, l), distribute.type = TRUE) # same xyplot(y1 + y2 ~ x1, anscombe, type = c(p, l), panel = panel.superpose.2) On

Re: [R] Numbers with correct significant digits

2006-11-17 Thread Gabor Grothendieck
You must be thinking of some other language: is.integer(1) [1] FALSE On 11/17/06, Andrew Robinson [EMAIL PROTECTED] wrote: Nice solution. I believe that showing the decimal point is correct. It demonstrates that the number is not an integer. Cheers Andrew On Fri, Nov 17, 2006 at

Re: [R] Numbers with correct significant digits

2006-11-17 Thread Andrew Robinson
I meant that it demonstrates that the number is not an integer to the reader, regardless of how it is stored. In the reporting of measurements, 10 is interpreted as an integer, whereas 10. is interpreted as a real, rounded to two significant digits. Cheers Andrew On Fri, Nov 17, 2006 at

Re: [R] lme4 package: Fitted values and residuals

2006-11-17 Thread Renaud Lancelot
Not quite: library(lme4) sessionInfo() R version 2.4.0 (2006-10-03) i386-pc-mingw32 locale: LC_COLLATE=French_France.1252;LC_CTYPE=French_France.1252;LC_MONETARY=French_France.1252;LC_NUMERIC=C;LC_TIME=French_France.1252 attached base packages: [1] methods stats graphics grDevices

Re: [R] deriv when one term is indexed

2006-11-17 Thread Ken Knoblauch
Thank you for your rapid response. This is reproducible on my system. Here it is again, with, I hope, sufficient detail to properly document what does not work and what does on my system, But my original question, properly motivated or not, concerns whether there is a way to use or adapt

  1   2   >