Skip to contents

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

...

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

if (FALSE) {
yay::open_as_tmp_spreadsheet(mtcars,
                             format = "xlsx")}