Skip to content

Instantly share code, notes, and snippets.

@air-drummer
Last active August 29, 2015 14:08
Show Gist options
  • Save air-drummer/12b612ea8b9655d7c82b to your computer and use it in GitHub Desktop.
Save air-drummer/12b612ea8b9655d7c82b to your computer and use it in GitHub Desktop.
Making path to working directory valid in different platforms (OS X, Windows, etc.) in R
if (.Platform$OS.type == "unix") {
setwd("~/your/path/to/the/working_directory/in/OSX")
} else {
setwd("your/path/to/the/working_directory/in/WINDOWS")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment