I want to write temporary data to disk in an R-package, and I want to be sure that it can work on every OS, without assuming that the user has administrator rights. Is there an existing R function that can provide a path to a temporary directory on all major operating systems? Or a way to link to the user's home directory?
Otherwise, I thought about it:
Sys.getenv("temp")
I assume that I cannot expect people to have write access to their R-locations, otherwise I could reference the path in the package directory: .find.package("package.name") .
r
Shane
source share