I am moving away from Word/Excel tables and trying to generate a table in R. I have a data frame that I'd like to simply print as a plot, while being able to shade/colour cells and generally play with the aesthetics.
x <- data.frame(row.names=paste("Name",1:10))
x[,1] <- 1:10
x[,2] <- sample(1:100,10)
x[,3] <- sample(LETTERS[1:26],10)
colnames(x) <- c("Value 1", "Value 2", "Label")
View(x)
provides the exact format I'd like my table, just as a save-able plot.
I tried
plot(x,type="h")
But received an error:
Error in plot.default(...) : formal argument "type" matched by
multiple actual arguments
I have seen how to output tables with two columns, but how can I plot the data frame as-is? Bonus points for showing how to stick that table below another scatter plot that I have created, so that the output ggsave has the scatter plot with the table under it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…