Im working a lot on different machines so my files are saved in a dropbox. The path to that dropbox differs between Mac's and Windows based computers.
At the beginning of my R script I want to check where the script is saved in and use that information to read in the excel spreadsheet. Heres a pseudo code for what I mean:
dir <- read_dir(current_script)
excel.file <- file.path("dir/data.xls")
So in the end I dont always have to change the code when I switch the computer.
Is there any function to read out that path?