Re: [R-pkg-devel] Writing to files without altering working directory in R package

2019-05-07 Thread Duncan Murdoch
On 07/05/2019 6:44 p.m., Uwe Ligges wrote: On 07.05.2019 19:57, Duncan Murdoch wrote: On 06/05/2019 12:16 p.m., Jim Hester wrote: For what it's worth, the recommendation to use `tempfile()` is very confusing to R users. Often users (particularly new users) jump directly to examples when

Re: [R-pkg-devel] Writing to files without altering working directory in R package

2019-05-07 Thread Uwe Ligges
On 07.05.2019 19:57, Duncan Murdoch wrote: On 06/05/2019 12:16 p.m., Jim Hester wrote: For what it's worth, the recommendation to use `tempfile()` is very confusing to R users. Often users (particularly new users) jump directly to examples when reading documentation and when you have these

Re: [R-pkg-devel] Writing to files without altering working directory in R package

2019-05-07 Thread Henrik Bengtsson
I agree that setwd(), tempdir(), etc. clutter up examples. At the same time, I respect the CRAN policy - it's conservative approach has helped us avoid a wild-west working environment. One approach that might help bring some standardization, instead of each package developer rolls their own, and

Re: [R-pkg-devel] Writing to files without altering working directory in R package

2019-05-07 Thread Duncan Murdoch
On 06/05/2019 12:16 p.m., Jim Hester wrote: For what it's worth, the recommendation to use `tempfile()` is very confusing to R users. Often users (particularly new users) jump directly to examples when reading documentation and when you have these more complicated examples they do not realize