# NOT RUN {
# Empty date field returns current repo
oldRepos <- getOption("repos")
setSnapshot()
# Valid snapshot date
# Connects to MRAN to check for valid URL, so skip on CRAN
# }
# NOT RUN {
setSnapshot("2014-11-16")
# }
# NOT RUN {
# Invalid snapshot date (in future), returns error
# }
# NOT RUN {
setSnapshot("2100-01-01")
# }
# NOT RUN {
options(repos = oldRepos)
# }
Run the code above in your browser using DataLab