Skip to content
Prev 55005 / 63424 Next

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', 'workdir', ...

/Henrik

On Fri, Mar 30, 2018 at 9:25 AM, Uwe Ligges
<ligges at statistik.tu-dortmund.de> wrote: