Learn R Programming

giftwrap (version 0.0.4)

temporary: Write an object to a temporary file

Description

Write an object to a temporary CSV, RDS, or raw text file, and return the path to that file. This can be used, for example, as an argument to a giftwrapped function.

Usage

temp_csv(x, ...)

temp_rds(x, ...)

temp_lines(x, ...)

Arguments

x

An object

...

Extra arguments passed to the relevant writing function (such as write_csv for temp_csv)

Value

A string with the temporary filename containing the output. This will be in the temporary per-session directory.

See Also

tempfile

Examples

Run this code
# NOT RUN {
wrap_commands("cat")

cat(temp_csv(mtcars))

# }

Run the code above in your browser using DataLab