Is it possible in R to set the working directory to a currently opened folder automatically?
Example: Let's assume that I have currently opened the folder example_dir on my computer.
Now, I want to run some R code to set this folder as my working directory without knowing the name of the opened folder. The R code should look like this:
currently_opened_folder <- xxxxxxx some function extracting the path for example_dir xxxxxxxx
setwd(currently_opened_folder)