r - setwd() does not work in Rmd-file in Rstudio -
setwd() not work in rmd-file.
this different issue question: in rstudio/rmarkdown, how setwd?, because issue can't set wd in one chunk, while linked question ask ways set wd globally all chunks, while having no problems setting wd one chunk.
a call setwd() works .r-file, not work when sent console .rmd-file.
the picture below shows 2 instances of call setwd(), using same directory each time. first time works, second time not work, can seen fact getwd() not show directory specified in setwd().
in base rgui works:
sometimes (but not everytime) when run code following warnings:
have tried in current version of rstudio, , in development version of rstudio. of above applies working interactively, have not called knitr on file.
r version 3.4.1 (2017-06-30) platform: x86_64-w64-mingw32/x64 (64-bit) running under: windows >= 8 x64 (build 9200) matrix products: default locale: [1] lc_collate=english_united states.1252 lc_ctype=english_united states.1252 lc_monetary=english_united states.1252 [4] lc_numeric=c lc_time=english_united states.1252 attached base packages: [1] stats graphics grdevices utils datasets methods base loaded via namespace (and not attached): [1] compiler_3.4.1 tools_3.4.1 yaml_2.1.14 knitr_1.17



Comments
Post a Comment