These are wrappers around tempdir and tempfile that creates the directory or file, to ensure a correctly normalized filepath (i.e., on macOS).

td(dir = tempdir())

tf(ext = ".tif", dir = td())

Arguments

dir

Path to use as temporary directory. A subdirectory will be created. Default is to use the R session temporary directory.

ext

File extension to give to the newly create file.

Value

Character string indicating the filepath to the newly created file.

Author

Alex Chubaty