require("gridExtra") a= 1:10 b=1:5 d=1:7 a <- a*0.043562 # data.frame(a,b,d) #different length # Error in data.frame(a, b, d) : # arguments imply differing number of rows: 10, 5, 7 length(b) = length(d) = length(a) d <-data.frame(a,b,d) # no error now quartz(height=4, width=3) # to the screen grid.table(format(d,digits=2)) quartz(height=4, width=3) # to the screen names(d)[2] <- "very tall\n name" grid.table(d, equal.height=TRUE) #grid.table(format(d,digits=2), gpar.corefill = gpar(fill="slateblue",alpha=0.5), h.even.alpha = 0.5) pdf("tabella.pdf", height=4, width=3) # to a pdf grid.table(d) dev.off()