save.table: Save a table in various formats

View source: R/save.R

save.tableR Documentation

Save a table in various formats

Description

This function saves a given table in CSV, Excel, and LaTeX formats to a specified directory with a given filename.

Usage

save.table(tab, tabl, path, fn)

Arguments

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.

Value

This function does not return any value. It saves files to the specified path.

Examples

# 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")


DiogoFerrari/edar documentation built on Dec. 1, 2024, 10:47 p.m.