View source: R/S03_Utilities.R
print_table | R Documentation |
Given a data frame, prints to console a formatted table of the results.
print_table(tbl, return = F)
tbl |
A formatted data frame. |
return |
Logical; if |
If return
is TRUE
returns the
vector of character strings with the formatted output
for each row of the table.
data("mtcars")
tbl <- aggregate(mtcars$mpg, mtcars[, c("cyl", "vs")], mean)
tbl$x <- round(tbl$x, 1)
colnames(tbl) <- c("# of cylinders", "Engine type", "Miles per gallon")
print_table(tbl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.