save.table | R Documentation |
This function saves a given table in CSV, Excel, and LaTeX formats to a specified directory with a given filename.
save.table(tab, tabl, path, fn)
tab |
A data frame or matrix to be saved. |
tabl |
A character string with the LaTeX code for the table. |
path |
A character string specifying the directory path where the files will be saved. |
fn |
A character string specifying the base filename (with or without extension) for the output files. |
This function does not return any value. It saves files to the specified path.
# Sample data frame
tab <- data.frame(Name = c("John", "Jane"), Age = c(30, 25))
# Sample LaTeX table representation
tabl <- kable(df)
# Save the table
save.table(tab, tabl, path = "output", fn = "my_table.tex")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.