I need to set up different paths for my code depending on whether it is being run in windows or unix. I currently have it set up so that the user has to change a variable "Renvironment" before running, as below.
Renvironment <- "windows"
if (Renvironment == "windows") {
working_dir <- "windows_path..."
function_library <- "windows_path..."
} else if (Renvironment == "unix") {
working_dir <- "unix_path..."
function_library <- "unix_path..."
}
I was wondering though whether there are default R environment variables that I can use instead to save the user having to remember to manually change the variable?