library(magrittr)
# Create Table
tbl <- create_table(mtcars) %>%
define(mpg, label = "Miles Per Gallon", width = .5) %>%
define(cyl, label = "Cylinders") %>%
titles("Table 6.4", "MTCARS Sample Table") %>%
footnotes("* Motor Trend, 1974")
tbl
# A table specification:
# - data: data.frame 'mtcars' 32 rows 11 cols
# - show_cols: all
# - use_attributes: all
# - title 1: 'Table 6.4'
# - title 2: 'MTCARS Sample Table'
# - footnote 1: '* Motor Trend, 1974'
# - define: mpg 'Miles Per Gallon' width=0.5
# - define: cyl 'Cylinders'
Run the code above in your browser using DataLab