We are three people using the same R script to work on our research project in R Studio. This brings some issues by setting the working directory, because the file and the data sheets are saved locally in everyones Dropbox folder. So we use the same script and the same data but the path to the working directory is for example like 'C:/Users/thoma/Dropbox/...' in my case.
I can set the wd by setwd("directory") at the beginning of our code, but this works for me only.
My Question: Is there a command that asks me where to set my wd that every user can set his own working directory like askforwd()
The data in each folder is synced so this is the only path that has to be changed everytime a different user is running the code.
Thanks for your help!
Here's an example of our code:
setwd("C:/Users/thoma/Dropbox/") #sets the directory
Datensatz <- read_excel("Datensatz.xlsx") #reads the synced data in the folder
getwd()
gets the current working directory. – Jack Armstrong