Re: [R] grouping elements of a data frame
Hi, Try this: The last part was not clear. A.df<-read.table(text=" a c 0.9 b x 0.8 b z 0.5 c y 0.9 c x 0.7 c z 0.6 ",sep="",header=FALSE,stringsAsFactors=FALSE) lst1<-split(A.df[,-1],A.df$V1) lst1 #$a # V2 V3 #1 c 0.9 # #$b #
Re: [R] grouping elements of a data frame
On Jan 15, 2013, at 9:10 AM, Nuri Alpay Temiz wrote: > Hi everyone, > > I have a question on selecting and grouping elements of a data frame. For > example: > > A.df<- [ a c 0.9 > b x 0.8 > b z 0.5 > c y 0.9 > c x 0.7 > c z 0.6] Tha