Hi, Use ?split() #dat1 is the dataset: lst1<- split(dat1,dat1$BaseProd) lst1 #$`2231` # BaseProd CF OSA #1 2231 0.5 0.7 #2 2231 0.8 0.6 #3 2231 0.4 0.8 # #$`2232` # BaseProd CF OSA #4 2232 1 2 #5 2232 3 1 # #$`2233` # BaseProd CF OSA #6 2233 0.9 0.5 #7 2233 0.7 0.5 #8 2233 4.0 5.0 #9 2233 5.0 7.0
lst1[[1]] # BaseProd CF OSA #1 2231 0.5 0.7 #2 2231 0.8 0.6 #3 2231 0.4 0.8 A.K. Hi, I am totally new to R. I am facing the following problem: I have data of the following form BaseProd CF OSA 2231 0.5 0.7 2231 0.8 0.6 2231 0.4 0.8 2232 1 2 2232 3 1 2233 0.9 0.5 2233 0.7 0.5 2233 4 5 2233 5 7 I want to divide the data so that the data get divided on the basis of base product. like: data1 BaseProd CF OSA 2231 0.5 0.7 2231 0.8 0.6 2231 0.4 0.8 data2 BaseProd CF OSA 2232 1 2 2232 3 1 data3 BaseProd CF OSA 2233 0.9 0.5 2233 0.7 0.5 2233 4 5 2233 5 7 Please help me ... Its very important and please reply ASAP ______________________________________________ R-help@r-project.org 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.