library("tinytable")
library(tinytable)
<- mtcars[1:4, 1:5]
x
<- file.path(tempdir(), "test.html")
fn tt(x) |> save_tt(fn, overwrite = TRUE)
library(tinytable)
<- file.path(tempdir(), "table.tex")
filename tt(mtcars[1:4, 1:4]) |> save_tt(filename)
Save a Tiny Table to File
Description
This function saves an object of class tinytable to a specified file and format, with an option to overwrite existing files.
Usage
save_tt(x, output, overwrite = FALSE)
Arguments
x
|
The tinytable object to be saved. |
output
|
String or file path.
|
overwrite
|
A logical value indicating whether to overwrite an existing file. |
Value
A string with the table when output
is a format, and the file path when output
is a valid path.