search for: withtempdir

Displaying 4 results from an estimated 4 matches for "withtempdir".

2018 Apr 03
2
Base R examples that write to current working directory
...hin a day or two, so we can safely apply it also to R 3.5.0 alpha (before it turns beta!). I think the 'eval.path' argument to example() is a nice idea, but also changing its default to tempdir() is definitely out of the question for R 3.5.0. Martin > 2. wrap example code in a withTempDir({ ... }) call. > 3. Add an 'eval.path' (*) argument to example() and make > it default to eval.path = tempdir(). This would probably > be backward compatible and keep the code example clean. > The downside is when a user runs an example and can't > lo...
2018 Mar 30
2
Base R examples that write to current working directory
On 30.03.2018 00:08, Duncan Murdoch wrote: > On 29/03/2018 5:23 PM, Hadley Wickham wrote: >> Hi all, >> >> Given the recent CRAN push to prevent examples writing to the working >> directory, is there any interest in fixing base R examples that write >> to the working directory? A few candidates are the graphics devices, >> file.create(), writeBin(),
2018 Mar 30
0
Base R examples that write to current working directory
So, the proposal would then be to write to tempdir(), correct? If so, I see three alternatives: 1. explicitly use file.path(tempdir(), filename), or tempfile() everywhere. 2. wrap example code in a withTempDir({ ... }) call. 3. Add an 'eval.path' (*) argument to example() and make it default to eval.path = tempdir(). This would probably be backward compatible and keep the code example clean. The downside is when a user runs an example and can't locate produced files. (*) or 'wd', ...
2018 Apr 04
0
Base R examples that write to current working directory
...it also to R 3.5.0 alpha (before it turns beta!). > > I think the 'eval.path' argument to example() is a nice idea, > but also changing its default to tempdir() is definitely out of > the question for R 3.5.0. > > Martin > > > > 2. wrap example code in a withTempDir({ ... }) call. > > > 3. Add an 'eval.path' (*) argument to example() and make > > it default to eval.path = tempdir(). This would probably > > be backward compatible and keep the code example clean. > > The downside is when a user runs an example a...