I am working on Latex and R and using following code. <<echo=FALSE>>= infile<-read.table("test.txt",sep="\t") Col3 <- unique(infile[,3]) LCol3 <- length(Col3) for (i in 1:LCol3) {
print(paste("Column", Col3[i])) print(infile[infile[,3]==Col3[i],-3]) } @ I am getting following output. 1] "Column C" V1 V2 V4 1 A B D 2 X T K [1] "Column Z" V1 V2 V4 3 Z U M 4 E V R 5 Z U M [1] "Column P" V1 V2 V4 6 E V R Blockquote I want to avoid numbering and columns names. I want my output as follows. "Column C" A B D X T K "Column Z" Z U M E V R Z U M "Column P" E V R How can i implement it? -- View this message in context: http://r.789695.n4.nabble.com/Output-formatting-in-Latex-and-R-tp4483631p4483631.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.