Skip to content
Prev 14779 / 21318 Next

[Bioc-devel] What is Bioconductor's position on allowing users to create files in the working directory without an explicit path definition in the filename

Hi Koustav,

 From a Build System point of view, we certainly don't want packages to 
write files to the user's home (or to the current directory, which might 
be different from the user's home) during 'R CMD build' and 'R CMD 
check'. (Note that there is actually no guarantee that the current 
directory is writable.) We also don't want these files to be persistent. 
Using tempfile() (or some other place under tempdir()) gives you 
everything you need: a place that is guaranteed to be writable, and 
where the files are automatically removed at the end of the session for 
you. Plus, tempfile() gives you a unique path at each call so guarantees 
that you won't clash with an existing file.

So regardless of where your 'Output.Filename' argument is pointing to by 
default (some place under the user's home, the current dir, etc...), you 
need to make sure that it is set to a place under tempdir() in your 
examples and vignettes.

Hope this helps,

H.
On 3/22/19 09:33, Koustav Pal wrote: