I would really appreciate it if anyone could determine what is going on with the following command. It is only half-working and is losing lots of data. For the life of me I cannot even see the pattern of what it is losing and what it is not. I am attaching the R data set which you can use with the Load Workspace menu function. WideICA<-reshape(ICA,v.names=c("OD","Thickness","Surface.Cover"),idvar=c("Strain","ica","Rep","Locations"),drop="Growth",timevar="Time",direction="wide") The following two commands should give the same data (other than the missing values) but they do not. ICA[ICA$Time==6,"Surface.Cover"] WideICA$Surface.Cover.6 -- Farrel Buchinsky Pediatric Otolaryngologist Allegheny General Hospital Pittsburgh, PA USA
The attached file never went through. How does one attach a R workskpace (or two dataframes) "Farrel Buchinsky" <fjbuch at gmail.com> wrote in message news:bd93cdad0611291010r56ea989dj3b9c955b9697a431 at mail.gmail.com...>I would really appreciate it if anyone could determine what is going > on with the following command. It is only half-working and is losing > lots of data. For the life of me I cannot even see the pattern of what > it is losing and what it is not. > > I am attaching the R data set which you can use with the Load > Workspace menu function. > > WideICA<-reshape(ICA,v.names=c("OD","Thickness","Surface.Cover"),idvar=c("Strain","ica","Rep","Locations"),drop="Growth",timevar="Time",direction="wide") > > The following two commands should give the same data (other than the > missing values) but they do not. > > ICA[ICA$Time==6,"Surface.Cover"] > > WideICA$Surface.Cover.6 > > -- > Farrel Buchinsky > Pediatric Otolaryngologist > Allegheny General Hospital > Pittsburgh, PA USA >--------------------------------------------------------------------------------> ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Thank you very much Hadley. I still do not know why my original reshape command did not work but for the "price" of a library download I was able to solve my problem wonderfully. Thank you for salvaging many hours of work. The melt and cast concept is wonderful and simple Farrel On 11/29/06, hadley wickham <h.wickham@gmail.com> wrote:> > You may want to try the reshape package, http://had.co.nz/reshape, > instead. It's more flexible and (hopefully) easier to than the > reshape function. > > Regards, > > Hadley > > On 11/30/06, Farrel Buchinsky <fjbuch@gmail.com> wrote: > > I would really appreciate it if anyone could determine what is going > > on with the following command. It is only half-working and is losing > > lots of data. For the life of me I cannot even see the pattern of what > > it is losing and what it is not. > > > > I am attaching the R data set which you can use with the Load > > Workspace menu function. > > > > WideICA<-reshape(ICA,v.names=c("OD","Thickness","Surface.Cover > "),idvar=c("Strain","ica","Rep","Locations"),drop="Growth",timevar="Time",direction="wide") > > > > The following two commands should give the same data (other than the > > missing values) but they do not. > > > > ICA[ICA$Time==6,"Surface.Cover"] > > > > WideICA$Surface.Cover.6 > > > > -- > > Farrel Buchinsky > > Pediatric Otolaryngologist > > Allegheny General Hospital > > Pittsburgh, PA USA > > > > > > ______________________________________________ > > R-help@stat.math.ethz.ch mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > > > > > >-- Farrel Buchinsky Mobile: (412) 779-1073 [[alternative HTML version deleted]]