How to get the parent directory in R language?
To get the parent directory in R, we can use getwd() as follows
working_dir <- getwd()
setwd("..")
parent <- getwd()
setwd(working_dir)