Re: [R] OK - I got the data - now what? :-)

2009-07-08 Thread Mark Knecht
On Wed, Jul 8, 2009 at 10:51 AM, Michael A. Miller wrote: >> Mark wrote: > >    > Currently my data is one experiment per row, but that's >    > wasting space as most experiments only take 20% of the row >    > and 80% of the row is filled with 0's. I might want to make >    > the array more na

Re: [R] OK - I got the data - now what? :-)

2009-07-08 Thread Michael A. Miller
> Mark wrote: > Currently my data is one experiment per row, but that's > wasting space as most experiments only take 20% of the row > and 80% of the row is filled with 0's. I might want to make > the array more narrow and have a flag somewhere in the 1st > 10 columns that

Re: [R] OK - I got the data - now what? :-)

2009-07-07 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 06.07.2009 01:58:38: > On Sun, Jul 5, 2009 at 1:44 PM, hadley wickham wrote: > >> I think the root cause of a number of my coding problems in R right > >> now is my lack of skills in reading and grabbing portions of the data > >> out of arrays. I'm ne

Re: [R] OK - I got the data - now what? :-)

2009-07-06 Thread Mark Knecht
Hi Mark, Don't be the least bit sorry that I'm finding any of this hard to understand. That's my problem. I ordered the Phil Spektor's "Data Manipulation with R (Use R)" book last night as I realize I need to go through some sort of training. Hopefully that will help clear up some of my question

Re: [R] OK - I got the data - now what? :-)

2009-07-06 Thread Mark Wardle
Hi. As I said in my first email, converting your data into a "long" format makes a lot of sense. I'm sorry that you find it "hard ... to understand why this would make plotting easier". Wide format: Subject ID, Experiment ID, humidity, light, whatever, T1, T2,T3,T4. is much better rotated to

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Don MacQueen
At 10:42 AM -0700 7/5/09, Mark Knecht wrote: 2009/7/5 Uwe Ligges : <- a lot of other conversation omitted, to focus on the following> Currently my data is one experiment per row, but that's wasting space as most experiments only take 20% of the row and 80% of the row is filled with 0's. I

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Mark Knecht
On Sun, Jul 5, 2009 at 1:44 PM, hadley wickham wrote: >>   I think the root cause of a number of my coding problems in R right >> now is my lack of skills in reading and grabbing portions of the data >> out of arrays. I'm new at this. (And not a programmer) I need to find >> some good examples to r

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread hadley wickham
>   I think the root cause of a number of my coding problems in R right > now is my lack of skills in reading and grabbing portions of the data > out of arrays. I'm new at this. (And not a programmer) I need to find > some good examples to read and test on that subject. If I could locate > which co

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Mark Knecht
On Sun, Jul 5, 2009 at 1:00 PM, Henrique Dallazuanna wrote: > Yes, > > First, select only columns C1 to C6, then look for values greater than 0, > after use this to select the columns in original subset. > > On Sun, Jul 5, 2009 at 4:48 PM, Mark Knecht wrote: >> >> On Sun, Jul 5, 2009 at 12:30 PM,

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Henrique Dallazuanna
Yes, First, select only columns C1 to C6, then look for values greater than 0, after use this to select the columns in original subset. On Sun, Jul 5, 2009 at 4:48 PM, Mark Knecht wrote: > On Sun, Jul 5, 2009 at 12:30 PM, Henrique Dallazuanna > wrote: > > Try this: > > > > subset(test[3,], sele

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Mark Knecht
On Sun, Jul 5, 2009 at 12:30 PM, Henrique Dallazuanna wrote: > Try this: > > subset(test[3,], select=C1:C6)[,subset(test[3,], select = C1:C6) > 0] > > subset(test[6,], select=C1:C6)[,subset(test[6,], select = C1:C6) > 0] > > I must admit I like this one. Pleasing to look at. It seems approachable.

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Henrique Dallazuanna
Try this: subset(test[3,], select=C1:C6)[,subset(test[3,], select = C1:C6) > 0] subset(test[6,], select=C1:C6)[,subset(test[6,], select = C1:C6) > 0] On Sun, Jul 5, 2009 at 1:19 PM, Mark Knecht wrote: > On Sun, Jul 5, 2009 at 8:18 AM, David Winsemius > wrote: > > > > On Jul 5, 2009, at 10:50

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Uwe Ligges
David Winsemius wrote: On Jul 5, 2009, at 1:19 PM, Uwe Ligges wrote: snippedpreample test <- data.frame(A=1:10, B=100, C1=runif(10), C2=runif(10), C3=runif(10), C4=runif(10), C5=runif(10), C6=runif(10)) test<-round(test,2) #Make array ragged test$C3[2]<-0;test$C4[2]<-0;test$C5[2]<-0;test$C

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread David Winsemius
On Jul 5, 2009, at 1:19 PM, Uwe Ligges wrote: snippedpreample test <- data.frame(A=1:10, B=100, C1=runif(10), C2=runif(10), C3=runif(10), C4=runif(10), C5=runif(10), C6=runif(10)) test<-round(test,2) #Make array ragged test$C3[2]<-0;test$C4[2]<-0;test$C5[2]<-0;test$C6[2]<-0 test$C4[3]<-0;test

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Mark Knecht
2009/7/5 Uwe Ligges : > > > David Winsemius wrote: >> >> On Jul 5, 2009, at 12:19 PM, Mark Knecht wrote: >> >>> On Sun, Jul 5, 2009 at 8:18 AM, David Winsemius >>> wrote: On Jul 5, 2009, at 10:50 AM, Uwe Ligges wrote: > > > David Winsemius wrote: >> >> So if your

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Uwe Ligges
David Winsemius wrote: On Jul 5, 2009, at 12:19 PM, Mark Knecht wrote: On Sun, Jul 5, 2009 at 8:18 AM, David Winsemius wrote: On Jul 5, 2009, at 10:50 AM, Uwe Ligges wrote: David Winsemius wrote: So if your values are calculated from other values then consider using all.equal() And r

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread David Winsemius
On Jul 5, 2009, at 12:19 PM, Mark Knecht wrote: On Sun, Jul 5, 2009 at 8:18 AM, David Winsemius wrote: On Jul 5, 2009, at 10:50 AM, Uwe Ligges wrote: David Winsemius wrote: So if your values are calculated from other values then consider using all.equal() And repeated applications o

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Mark Knecht
On Sun, Jul 5, 2009 at 8:18 AM, David Winsemius wrote: > > On Jul 5, 2009, at 10:50 AM, Uwe Ligges wrote: > >> >> >> David Winsemius wrote: >>> >>> So if your values are calculated from other values then consider using >>> all.equal() >>> And repeated applications of the testing criteria process ar

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread David Winsemius
On Jul 5, 2009, at 10:50 AM, Uwe Ligges wrote: David Winsemius wrote: So if your values are calculated from other values then consider using all.equal() And repeated applications of the testing criteria process are effective: test[3,][which(names(test)=="C1"):(which(test[3,] == 0.0)-1)

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Mark Knecht
On Sun, Jul 5, 2009 at 7:35 AM, David Winsemius wrote: > > On Jul 5, 2009, at 9:53 AM, Mark Knecht wrote: > >> On Sat, Jul 4, 2009 at 5:22 PM, jim holtman wrote: >>> >>> See if this example helps; show how to either plot the row or columns >>> of a data frame: >>> test <- data.frame(C1=runif(1

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Uwe Ligges
David Winsemius wrote: On Jul 5, 2009, at 9:53 AM, Mark Knecht wrote: On Sat, Jul 4, 2009 at 5:22 PM, jim holtman wrote: See if this example helps; show how to either plot the row or columns of a data frame: test <- data.frame(C1=runif(10), C2=runif(10), C3=runif(10)) test C1

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread David Winsemius
On Jul 5, 2009, at 9:53 AM, Mark Knecht wrote: On Sat, Jul 4, 2009 at 5:22 PM, jim holtman wrote: See if this example helps; show how to either plot the row or columns of a data frame: test <- data.frame(C1=runif(10), C2=runif(10), C3=runif(10)) test C1C2C3 1 0.91

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Mark Knecht
On Sun, Jul 5, 2009 at 12:00 AM, Mark Wardle wrote: > Hi. Essentially your data is currently in "wide" format, with repeated > measures in different columns. For most analysis and in particular for > graphing, it is frequently helpful to reshape your data into a "long" > format, with one row per da

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Mark Knecht
On Sat, Jul 4, 2009 at 5:22 PM, jim holtman wrote: > See if this example helps; show how to either plot the row or columns > of a data frame: > >> test <- data.frame(C1=runif(10), C2=runif(10), C3=runif(10)) >> test >           C1        C2        C3 > 1  0.91287592 0.3390729 0.4346595 > 2  0.29360

Re: [R] OK - I got the data - now what? :-)

2009-07-05 Thread Mark Wardle
Hi. Essentially your data is currently in "wide" format, with repeated measures in different columns. For most analysis and in particular for graphing, it is frequently helpful to reshape your data into a "long" format, with one row per data value and additional variables to list experiment or subj

Re: [R] OK - I got the data - now what? :-)

2009-07-04 Thread jim holtman
See if this example helps; show how to either plot the row or columns of a data frame: > test <- data.frame(C1=runif(10), C2=runif(10), C3=runif(10)) > test C1C2C3 1 0.91287592 0.3390729 0.4346595 2 0.29360337 0.8394404 0.7125147 3 0.45906573 0.3466835 0.344 4 0.

[R] OK - I got the data - now what? :-)

2009-07-04 Thread Mark Knecht
OK, I guess I'm getting better at the data part of R. I wrote a program outside of R this morning to dump a bunch of experimental data. It's a sort of ragged array - about 700 rows and 400 columns, but the amount of data in each column varies based on the length of the experiment. The real data end