Skip to content

Commit

Permalink
update Rprofile
Browse files Browse the repository at this point in the history
  • Loading branch information
atusy committed Nov 18, 2018
1 parent ea16bf8 commit c18d3cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .Rprofile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ options(repos = c(CRAN = "https://cran.ism.ac.jp/"))
installed <- rownames(utils::installed.packages())

## Stop if callr not installed
if(!('callr' %in% installed)) stop('Install callr to load .Rprofile')
if(!('callr' %in% installed)) stop('Install callr to load .Rprofile')

## Required packages on CRAN and GitHub

Expand Down Expand Up @@ -47,11 +47,11 @@ callr::r(
# Done if interactive mode on RStudio

if(interactive() && "RSTUDIO" %in% names(Sys.getenv())) {

## Copy .Rprofile to project root
if(!file.exists('.Rprofile') && dir(pattern = '\\.Rproj$') > 0)
file.copy('~/R/.Rprofile', '.Rprofile')

## Set default packages
options(defaultPackages =
c(getOption('defaultPackages'), cran, gh2)
Expand All @@ -60,4 +60,4 @@ if(interactive() && "RSTUDIO" %in% names(Sys.getenv())) {

# Remove values

rm(installed, cran, gh, gh2)
rm(cran, cran_missing, gh, gh2, gh_missing, installed)

0 comments on commit c18d3cc

Please sign in to comment.