stackinator
stackinator

Reputation: 5829

Turn Off Row Names when Printing a Table

This is a nifty way to print a table.

library(gridExtra)
library(grid)
d <- head(iris[,1:3])
grid.table(d)

I think the row names uglify the table though. So let's turn them off.

grid.table(d, row.names = FALSE)

Woops, that doesn't work and gives me this error.

Error in gtable_table(d, name = "core", fg_fun = theme$core$fg_fun, bg_fun = theme$core$bg_fun, : unused argument (row.names = FALSE)

What does work to turn off the row names?

Upvotes: 0

Views: 522

Answers (1)

sm925
sm925

Reputation: 2678

Try this:

grid.table(d, rows = NULL)

Upvotes: 2

Related Questions