[R] Output formatting in Latex and R

Manish Gupta mandecent.gupta at gmail.com
Mon Mar 19 02:58:35 CET 2012


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.



More information about the R-help mailing list