[R] xtable with vector

Stefan Nachtnebel e0425331 at stud4.tuwien.ac.at
Sat Jul 28 18:39:29 CEST 2007


Hello,

Is there a possibility to use xtable with a vector to generate a latex 
table? I always get an error, that no applicable method is available.

For example:

b<-1:12
dim(b)<-c(2,6)
dimnames(b)[[2]]<-paste("col",1:6)
xtable(b)

works fine and does not raise an error, but

a<-1:6
names(a)<-paste(col,1:6)
xtable(b)

does not work.

Regards, Stefan



More information about the R-help mailing list