Skip to content
Prev 2215 / 12125 Next

[R-pkg-devel] nparACT package: "working directory was changed to...resetting"

On 19/12/2017 9:42 AM, Blume Christine wrote:
Previously you were allowed to change directory in an example.  Now 
you're not.  This makes sense:  the user might not want to change the 
working directory.

To fix this, just save the old directory, and restore it at the end of 
your example.  For example,

   olddir <- setwd(tempdir())
   # Run the rest of the example code here
   setwd(olddir)

Duncan Murdoch