Commit c199b2f7 authored by andy.disch's avatar andy.disch

added reproducible research

parent 41ba7e89
## -------------------------------------------------------
##
## Demo the R package 'checkpoint'
##
## October 2, 2018 -- Andreas Scheidegger
## andreas.scheidegger@eawag.ch
## -------------------------------------------------------
## Microsoft stores every R package version since 2014-10-01. The
## packge 'checkpoint' provides a 'time-machine', so that you can get
## any old version very easy.
## See here for more Details:
## https://github.com/RevolutionAnalytics/checkpoint
## -----------
## 0) install the package 'adaptMCMC' in another R session for a demo.
## The currently version 1.3.
##
## Also install the packages 'checkpoint'.
## set working directory
setwd("...")
## -----------
## 1) Let's assume you wrote this script on "2016-10-2"
## and we want to use the packages version of this date.
library(checkpoint)
checkpoint("2016-10-2")
## First, the function checks every file in the current working
## directory to identify which packages you load. Next, it downloads
## the packages from this date in a special directory.
library(adaptMCMC)
## ... your fancy research code ...
## we can check the version of 'adatpMCMC' from 2016-10-2
installed.packages()["adaptMCMC",] # Ah, the good old times! -> Version 1.1
## -----------
## you could revert back to the future
unCheckpoint()
installed.packages()["adaptMCMC",] # All this new, shiny things! -> Version 1.3
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment