get working directory rstudio code example
Example 1: get working directory rstudio
# For getting current working directory in terminal in Rstudio
getwd()
setwd(dir)
Example 2: rstudio working directory
# Imports data from outside the working directory, allows to choose the file
d <- readRDS(file = file.choose())