to_latex
reads a data.frme an dgenerates a .tex
table, aiming to replicate the method of tablegenerator.com
to_latex(df, file, caption = "My table", label = "tab:df")
data.frame with three column.
Character, name of new .tex file
Character caption of table
Character, label of table
a text file with extension .tex.
Other helpers:
colplot()
,
dmonth()
,
wide_to_long()
if (FALSE) {
df <- data.frame(pollutant = rep(c("CO", "propadiene", "NO2"), 10),
emission = vein::Emissions(1:30),
region = rep(letters[1:2], 15))
df
long_to_wide(df)
(df2 <- long_to_wide(df, column_fixed = "region"))
to_latex(df2)
to_latex(long_to_wide(df, column_fixed = "region"),
file = paste0(tempfile(), ".tex"))
}