El 25/04/18 a las 20:21, Duncan Murdoch escribió:
On 25/04/2018 1:32 PM, Sarah Goslee wrote:
Don't change the working directory! That has all kinds of unpleasant
side effects for the unsuspecting user, possibly even more so than
writing to a file.
Instead, write the file to the temp directory,
On 2018-04-26 07:11, Jose A Guijarro wrote:
El 25/04/18 a las 20:21, Duncan Murdoch escribió:
On 25/04/2018 1:32 PM, Sarah Goslee wrote:
Don't change the working directory! That has all kinds of unpleasant
side effects for the unsuspecting user, possibly even more so than
writing to a file.
On 26/04/2018 9:28 AM, Spencer Graves wrote:
On 2018-04-26 07:11, Jose A Guijarro wrote:
El 25/04/18 a las 20:21, Duncan Murdoch escribió:
On 25/04/2018 1:32 PM, Sarah Goslee wrote:
Don't change the working directory! That has all kinds of unpleasant
side effects for the unsuspecting user, p
On Thu, Apr 26, 2018 at 6:28 AM, Spencer Graves
wrote:
>
>
> On 2018-04-26 07:11, Jose A Guijarro wrote:
>>
>> El 25/04/18 a las 20:21, Duncan Murdoch escribió:
>>>
>>> On 25/04/2018 1:32 PM, Sarah Goslee wrote:
Don't change the working directory! That has all kinds of unpleasant
si
On 26/04/2018 1:04 PM, Henrik Bengtsson wrote:
On Thu, Apr 26, 2018 at 6:28 AM, Spencer Graves
wrote:
On 2018-04-26 07:11, Jose A Guijarro wrote:
El 25/04/18 a las 20:21, Duncan Murdoch escribió:
On 25/04/2018 1:32 PM, Sarah Goslee wrote:
Don't change the working directory! That has all
The withr package has a bunch of simple functions executing code in various
contexts, e.g., in a given directory or with given options() settings:
> withr::with_dir
function (new, code)
{
old <- setwd(dir = new)
on.exit(setwd(old))
force(code)
}
> withr::with_dir(tempdir(), getwd())
[
One downside of all of this is that examples become increasingly dominated
by code re: tempdir setup and the like.
It may not discourage the people on this list, but I suspect too much extra
machinery makes the typical user less likely to engage with examples.
On Thu, Apr 26, 2018 at 10:04 AM, He
For the information: there were various ideas discussed around this in
R-devel thread 'Base R examples that write to current working
directory' started on 2018-03-29
(https://stat.ethz.ch/pipermail/r-devel/2018-March/075779.html).
On Thu, Apr 26, 2018 at 10:31 AM, Jennifer Bryan
wrote:
> One down