open_as_tmp_spreadsheet: Open as temporary spreadsheet

open_as_tmp_spreadsheetR Documentation

Open as temporary spreadsheet

Description

Writes an R object – usually tabular data like a dataframe or tibble – to a temporary spreadsheet and subsequently opens that spreadsheet in the system's default application using xopen::xopen(). The latter is usually equivalent to double-clicking on the file in a file browser.

Usage

open_as_tmp_spreadsheet(x, format = c("csv", "xlsx"), ..., quiet = TRUE)

Arguments

x

A dataframe or tibble, or something coercible to.

format

The spreadsheet format to use. One of

  • "csv" for a comma-separated values file written using readr::write_csv(). The default.

  • "xlsx" for an Office Open XML file commonly used by Microsoft Excel 2007+, written using writexl::write_xlsx().

...

Further arguments passed on to readr::write_csv() or writexl::write_xlsx(), depending on format.

quiet

Whether or not to echo the command to open the temporary spreadsheet on the console before running it.

Value

x invisibly.

See Also

Other data frame / tibble functions: show_diff()

Examples

## Not run: 
yay::open_as_tmp_spreadsheet(mtcars,
                             format = "xlsx")
## End(Not run)

salim-b/yay documentation built on Oct. 25, 2024, 9:42 p.m.