Last active
September 19, 2018 05:24
-
-
Save cgpu/e2a521898fd14c07bab95f1093e7bc86 to your computer and use it in GitHub Desktop.
ExecutionPC-agnostic Dropbox directory path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find os: | |
```{r} | |
os <- Sys.info()[[1]] | |
``` | |
# Create OS-relevant Dropbox file path: | |
```{r} | |
if(os == "Windows"){ | |
dropbox_dir = paste0( 'C:/Users/', Sys.info()[["user"]] ,"/" ,'Dropbox/') | |
} else if (os != "Windows") { | |
dropbox_dir = paste0('/home/',Sys.info()[["user"]],"/", 'Dropbox/') | |
} | |
``` | |
# Print file path for verifying correctness of path: | |
```{r} | |
cat("OS : ", os, "\n","~ : ", dropbox_dir) | |
``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment