with_tempfile {civis} | R Documentation |
Call a function with a temporary file.
Description
Call a function with a temporary file.
Usage
with_tempfile(fn, ...)
Arguments
fn |
a function that takes a filename as the first argument. |
... |
arguments passed to to fn. |
Value
object the return value of fn
Examples
## Not run:
data(iris)
with_tempfile(function(file_name) {
write.csv(iris, file_name)
# add'l operations
})
## End(Not run)
[Package civis version 3.1.2 Index]