This file contains 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
# Place this in a file at '~/.Rprofile' to ensure it's sourced on startup | |
.First <- function() { | |
# RStudio-specific startup | |
if (!is.na(Sys.getenv("RSTUDIO", unset = NA)) && | |
Sys.info()[["sysname"]] == "Windows") | |
{ | |
# work around mis-encoded environment variables | |
USERPROFILE <- Sys.getenv("USERPROFILE") | |
HOME <- file.path(USERPROFILE, "Documents", fsep = "\\") | |
R_USER <- HOME |