This function exports the provided table in both Excel (.xlsx) and LaTeX (.tex) formats. The table is archived with the current date in the filename for the Excel version, while the LaTeX version is saved with just the specified filename.

ama_export_tab(table, filename, filepath, caption = NULL, size = "small")

Arguments

table

A data frame or matrix.

filename

A character string specifying the filename without the extension.

filepath

A character string specifying the directory to save the file.

caption

A character string specifying the caption for the table.

size

Latex size including "tiny", or "small"

Examples

if (FALSE) {
data(mtcars)  # Load the mtcars dataset
ama_export_tab(mtcars[1:5, 1:5], "sample_table", tempdir(), "Sample Caption for mtcars")
}