Learn R Programming

civis (version 3.0.0)

with_tempfile: Call a function with a temporary file.

Description

Call a function with a temporary file.

Usage

with_tempfile(fn, ...)

Value

object the return value of fn

Arguments

fn

a function that takes a filename as the first argument.

...

arguments passed to to fn.

Examples

Run this code
if (FALSE) {
data(iris)
with_tempfile(function(file_name) {
 write.csv(iris, file_name)
 # add'l operations
})
}

Run the code above in your browser using DataLab