Last active
April 28, 2017 13:34
-
-
Save mschubert/0ce46ffc599358c9c799487898860395 to your computer and use it in GitHub Desktop.
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
# ignore system installation | |
# e.g. https://github.com/EBI-predocs/research-software/issues/57 | |
.libPaths("~/.R") | |
# no factor coercion | |
# no graphical package install menu | |
# warn if partial matching arguments | |
options( | |
stringsAsFactors = FALSE, | |
menu.graphics = FALSE, | |
repos = c(CRAN="http://mirrors.ebi.ac.uk/CRAN/"), | |
warnPartialMatchAttr = TRUE, | |
warnPartialMatchDollar = TRUE | |
) | |
# on non-interactive scripts, display traceback on errors | |
if (!interactive()) | |
options(error = function() { | |
traceback(2, max.lines=10) | |
quit(save="no", status=1) | |
}) | |
# save history to use up-arrow/ctrl+r in new session | |
if (interactive()) { | |
.Last = function() try(utils::savehistory("~/.Rhistory")) | |
utils::loadhistory("~/.Rhistory") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This should probably use
R_HISTFILE
instead of hardcoding the path. ;-)