Skip to content

Instantly share code, notes, and snippets.

@3inar
Created April 11, 2017 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3inar/f705e2c568a03be9aff14e58f6810948 to your computer and use it in GitHub Desktop.
Save 3inar/f705e2c568a03be9aff14e58f6810948 to your computer and use it in GitHub Desktop.
Example R script for stallo batch jobs
# This is my experiment that I want to run many times
x <- rnorm(500)
y <- rnorm(500)
my_model <- lm(y~x)
# I usually like to write my results to a randomly named file. I recommend using an absolute path
# so you're 100% sure where the file ends up
random_output_file <-paste0("/home/einar/my_experiments/linear_model", as.character(sample(1:999999, 1)), ".RData")
save(my_model, file = random_output_file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment