Skip to content

Instantly share code, notes, and snippets.

@aaronpuchert
Last active December 21, 2015 23:09
Show Gist options
  • Save aaronpuchert/6380536 to your computer and use it in GitHub Desktop.
Save aaronpuchert/6380536 to your computer and use it in GitHub Desktop.

Revisions

  1. aaronpuchert revised this gist Aug 29, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .Rprofile.R
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ require("parallel")

    # do not start in RStudio
    if (Sys.getenv("RSTUDIO_USER_IDENTITY") == "" && !file.exists(".cluster")) {
    cat(Sys.getpid(), file=".cluster")
    cat(Sys.getpid(), file=".cluster")
    Cluster <- makeCluster(detectCores())
    }

  2. aaronpuchert renamed this gist Aug 29, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. aaronpuchert created this gist Aug 29, 2013.
    16 changes: 16 additions & 0 deletions .Rprofile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    require("utils")
    require("parallel")

    # do not start in RStudio
    if (Sys.getenv("RSTUDIO_USER_IDENTITY") == "" && !file.exists(".cluster")) {
    cat(Sys.getpid(), file=".cluster")
    Cluster <- makeCluster(detectCores())
    }

    .First <- function() source("src/main.r") # should load all other sources
    .Last <- function() {
    if (exists("Cluster")) {
    stopCluster(Cluster)
    file.remove(".cluster")
    }
    }