Re: [R] need some help on r

2008-08-30 Thread Nicky Chorley
Tdf bin TCC_TCA TCA_CR TCC_CR Timesn.rnc 117 117 258 27314 (08/28/08 00:09:42) 50.21 118 118 251 30291 (08/28/08 00:09:47) 50.21 119 119 247 28289 (08/28/08 00:09:52) 50.21 120 120 251 29282 (08/28/08 00:09:57) 50.21

[R] need help

2008-08-30 Thread Kurapati, Ravichandra (Ravichandra)
Hi Dbfile contains bin TCC_TCA TCA_CRTCC_CRTime sn.rnc 1 301 38 365 (08/28/08 00:00:02) 50.20 2 302 39 358 (08/28/08 00:00:07) 50.20 3 319 43 377 (08/28/08 00:00:12) 50.20 4 312

[R] Non-numeric argument to fft

2008-08-30 Thread rkevinburton
I am calling fft and getting a non-numeric error: + fit - lm(Quantity ~ DayOfYear, .sublist) + # Make the time series + x - as.numeric(rep(0,512)) + x - merge(residuals(fit), x) + # Transform range to -pi - pi + x - x - pi + x - x * (2 *

Re: [R] need help

2008-08-30 Thread Berend Hasselman
If you do ?read.table you would most likely find the answer on your own. Have a look at the description of the as.is and colClasses argument. The column sn.rnc has been automatically recognised as being numeric. After Df1-read.table(Dbfile,colClasses=character,header=TRUE) you will see

[R] need help

2008-08-30 Thread Kurapati, Ravichandra (Ravichandra)
Hi str-50.20 as.numeric(str) [1] 50.2 But I want 50.20 as o/p How can I get Thanks K.Ravichandra [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] remove levels from a factor

2008-08-30 Thread Adrian Dusa
Yuan Jian jayuan2008 at yahoo.com writes: [...snip...] I want to remove level b because level b has less than 2. f [1] a a Levels: a f[which(f %in% names(table(f))[table(f) = 2]), drop=TRUE] [1] a a Levels: a HTH, Adrian __

Re: [R] remove levels from a factor

2008-08-30 Thread Frank E Harrell Jr
Adrian Dusa wrote: Adrian Dusa dusa.adrian at gmail.com writes: [...snip...] f[which(f %in% names(table(f))[table(f) = 2]), drop=TRUE] [1] a a Levels: a Or, more simple: f[f %in% names(table(f))[table(f) = 2], drop=TRUE] [1] a a Levels: a Adrian Also see the combine.levels function in

[R] [Fwd: ***HTML***R help]

2008-08-30 Thread Brian Lunergan
Original Message Subject: ***HTML***R help Date: Sat, 30 Aug 2008 14:30:48 +0530 From: sayeed hussain [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hello there I am stuck with a problem and I need help --- R has a defined function sum() I by chance defined a

Re: [R] [Fwd: ***HTML***R help]

2008-08-30 Thread Dieter Menne
Brian Lunergan ff809 at ncf.ca writes: I am stuck with a problem and I need help --- R has a defined function sum() I by chance defined a function with same name sum-function(type='public') { ... } and now I m not able to get rid of my sum() fuction.

[R] Luis Miguel Delgado Gomez/BBK está ausente d e la oficina.

2008-08-30 Thread Luis Miguel Delgado Gomez
Estaré ausente de la oficina desde el 29/08/2008 y no volveré hasta el 07/09/2008. Responderé a su mensaje cuando regrese. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Non-numeric argument to fft

2008-08-30 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: I am calling fft and getting a non-numeric error: + fit - lm(Quantity ~ DayOfYear, .sublist) + # Make the time series + x - as.numeric(rep(0,512)) + x - merge(residuals(fit), x) + # Transform range to -pi - pi + x - x -

Re: [R] need help

2008-08-30 Thread Uwe Ligges
Kurapati, Ravichandra (Ravichandra) wrote: Hi str-50.20 as.numeric(str) [1] 50.2 But I want 50.20 as o/p For output formatting, see ?formatC, for example. Uwe Ligges How can I get Thanks K.Ravichandra [[alternative HTML version

Re: [R] A housekeeping question...

2008-08-30 Thread Uwe Ligges
Brian Lunergan wrote: Evening all: Stepping away from the stats methodology questions for a moment, I have a housekeeping question for when it comes time to make the jump to v2.7.2. I'm running v2.7.1 on an XP system. I have a suspicion that, by way of experimentation with a couple of

Re: [R] Most common level of a factor by

2008-08-30 Thread Douglas Bates
On Fri, Aug 29, 2008 at 6:46 PM, David Huffer [EMAIL PROTECTED] wrote: I'm looking for something along the lines of which ( table ( x ) == max ( table ( x ) ) ) to find the most common level of one factor by several other factors. For instance, I've got X - data.frame ( + x = factor

[R] strsplit and regexp

2008-08-30 Thread Patrick Hausmann
Dear list, I am trying to split a string using regexp: x - 2 Value 34 a-c 45 t strsplit(x, [0-9]) [[1]] [1]Value a-c t But I don't want to lose the digits (pattern), the result should be: [[1]] [1] 2 Value 34 a-c 45 t Thanks for any tipp Patrick

Re: [R] strsplit and regexp

2008-08-30 Thread Gabor Grothendieck
Try this: library(gsubfn) strapply(x, [0-9]+| +[^ ]+ *)[[1]] [1] 2Value 34 a-c45 t which keeps the spaces around the non-numeric entries as in your example; however, if keeping the spaces is not important then its even easier: strsplit(x, )[[1]] [1] 2 Value 34

[R] Saving 3d objects vs. pausing in non-interactive (scripted) mode

2008-08-30 Thread Steven Shafer
I am using the RGL library in scripted (non-interactive) mode, but wish to give the data analyst an opportunity to exam the 3D plots. The data analysts understand the data, but not R. My intent is to provide simple Windows (XP) batch files that call R and automatically pass scripts to it, and thus

Re: [R] Non-numeric argument to fft

2008-08-30 Thread rkevinburton
If this is the case then how to I take a list of numbers (residuals in this case) and create anothe list that is longer and padded by zeros? Maybe fft already does this for me but as I understood it I need to pass an vector to the fft that is of a power of 2 length. If I still need to do this

[R] help with persp function

2008-08-30 Thread dxc13
Dear List, I am trying to draw a rectangular plane using the persp function, however I can't seem to get it to work. I want the length along x1 axis to be between 1 and 3 and the length along the x2 axis to be between 1 and 4. All z values for x1 should be equal (say, z=1) because this is a

[R] writing text and output to file with flexibility

2008-08-30 Thread Gonçalo Ferraz
Hi, I want a function to write some of its output into a text file with the following format: 'some text' output matrix A 'some more text' output matrix B 'some other text still' output matrix C ... The dimensions of matrices A, B, ... are different and the total number of matrices that I

[R] Unable to send color palette through plot.Design to method=image

2008-08-30 Thread David Winsemius
I have been trying to specify a different color palette to the image method in plot.Design. My model has crossed two rcs() arguments and one two-level gender argument. The goal which appears to have been mostly achieved is to produce separate bivariate plots for men and women The call to

Re: [R] writing text and output to file with flexibility

2008-08-30 Thread Katharine Mullen
you can combine write and write.table, using append=TRUE. e.g., write1 - function(txt, mat, filename) { for(i in 1:length(txt)) { write(txt[i], file=filename, append=i!=1) write.table(mat[[i]], file=filename, append=TRUE,sep =\t) } } t - c(text1, text2, text3) m -

Re: [R] Saving 3d objects vs. pausing in non-interactive (scripted) mode

2008-08-30 Thread Duncan Murdoch
On 30/08/2008 10:10 AM, Steven Shafer wrote: I am using the RGL library in scripted (non-interactive) mode, but wish to give the data analyst an opportunity to exam the 3D plots. The data analysts understand the data, but not R. My intent is to provide simple Windows (XP) batch files that call R

Re: [R] help with persp function

2008-08-30 Thread jim holtman
Is this what you want to do: x - seq(from=1,to=3,by=.1) y - seq(1,4,by=.1) z - matrix(1, length(x), length(y)) persp(x=x,y=y,z,zlim=c(0,2)) On Sat, Aug 30, 2008 at 2:08 PM, dxc13 [EMAIL PROTECTED] wrote: Dear List, I am trying to draw a rectangular plane using the persp function, however I

[R] randomForest partial dependence plots

2008-08-30 Thread Christopher Schwalm
Hello ALL, I'm unsure how to interpret partial dependence plots and had 2 questions: Does the randomForest library scale partial dependence plots such that zero on the y axis is mean(y)? I am also unclear as to why the range of y on these plots is smaller than what is in the dataset. Also I

Re: [R] help with persp function

2008-08-30 Thread dxc13
Yes, this works nicely. Thank you! jholtman wrote: Is this what you want to do: x - seq(from=1,to=3,by=.1) y - seq(1,4,by=.1) z - matrix(1, length(x), length(y)) persp(x=x,y=y,z,zlim=c(0,2)) On Sat, Aug 30, 2008 at 2:08 PM, dxc13 [EMAIL PROTECTED] wrote: Dear List, I am trying