2017-12-19 16:27 GMT+01:00 Blume Christine <christine.bl...@sbg.ac.at>:
> Hi Duncan,
>
> Thanks a lot! Good to see that you had a similar idea, I did just that...in 
> my example it looks like this, however, that does not help, i.e. that is the 
> code that is associated with the warning…
>
> data(sleepstudy)
>
> wd <- getwd()
>
> name <- "sleepstudy_example"
>
> newdir <- paste(wd,name, sep="/")
>
> if (dir.exists(newdir)){
>
> setwd(newdir)
>
> write.table(sleepstudy, file = "sleepstudy.txt", row.names=FALSE, col.names = 
> FALSE)
>
> r <- nparACT_flex_loop(newdir, SR = 4/60, minutes = 435)
>
> } else {
>
> dir.create(newdir)
>
> setwd(newdir)
>
> write.table(sleepstudy, file = "sleepstudy.txt", row.names=FALSE, col.names = 
> FALSE)
>
> r <- nparACT_flex_loop(newdir, SR = 4/60, minutes = 435)
>
> }
>
> setwd(wd)
>
> }

I see:

$ wget https://cran.r-project.org/src/contrib/nparACT_0.7.tar.gz
$ tar xf nparACT_0.7.tar.gz
$ grep -r setwd nparACT
nparACT/man/nparACT_flex_loop.Rd:setwd(newdir)
nparACT/man/nparACT_base_loop.Rd:setwd(newdir)

so two examples don't restore the wd as Duncan was pointing out.

Iñaki

>
>
>
> Best,
>
> Christine
>
>

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to