How about this --? ##Assumes you have read your data into data frame "Msg17"
## Capture unique values from data file's Column 3 Col3 <- unique(Msg17$V3) #Captures length of the unique value vector LCol3 <- length(Col3) ## Loop to sequentially select rows with the unique Col3 values for (i in 1:LCol3) { print(paste("Column", Col3[i])) print(Msg17[Msg17$V3==Col3[i],-3]) } Good luck! -- View this message in context: http://r.789695.n4.nabble.com/How-to-Group-Categorical-data-in-R-tp4477622p4481247.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.