Set working directory to where the current file is.
Set working directory to the path of the currently opened file. You can use this function in both .R/.Rmd files and the R console. RStudio (version >= 1.2) is required for running this function.
set.wd(path = NULL, directly = TRUE, ask = FALSE)
path |
|
directly |
|
ask |
|
Invisibly return the path.
## Not run: # RStudio (version >= 1.2) is required for running this function. set.wd() # set working directory to the path of the currently opened file set.wd("~/") # set working directory to the home directory set.wd("../") # set working directory to the parent directory set.wd(ask=TRUE) # select a folder with the prompt of a dialog ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.