Skip to content

Commit 3bc200e

Browse files
committed
Fix small issues to pass R CMD check
1 parent da7e53b commit 3bc200e

6 files changed

Lines changed: 270 additions & 5 deletions

File tree

R/checkpoint.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#'
2222
#' @section Changing the default MRAN url:
2323
#'
24-
#' \code{checkpoint} uses https by default to download packages (see \url{https://www.r-consortium.org/news/blogs/2015/08/best-practices-using-r-securely}).
24+
#' \code{checkpoint} uses https by default to download packages (see \url{https://www.r-consortium.org/blog/2015/08/17/best-practices-for-using-r-securely}).
2525
#' \code{checkpoint} Defaults to \url{https://mran.microsoft.com/snapshot} by default in R versions 3.2.0 and later, if https support is enabled.
2626
#'
2727
#' You can modify the default URL. To change the URL, use \code{options(checkpoint.mranUrl = ...)}

R/checkpoint_log.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ checkpoint_log <- function(log, snapshotDate, pkg, file = NULL){
99
z <- gsub(ptn, "\\2", log[grep(ptn, log)])
1010
z <- iconv(z, to = "ASCII", sub = "") # strip quotin
1111
if(length(z) == 0) return(z)
12-
# z <- gsub("[‘’'`‘\"]*", "", z, useBytes = FALSE)
13-
# z <- gsub("[‘’'`‘\"]*", "", z, useBytes = TRUE)
1412
strsplit(z, ", ")[[1]]
1513
}
1614

man/checkpoint.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/checkpoint.R

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
## ---- eval=FALSE---------------------------------------------------------
2+
# library(checkpoint)
3+
# checkpoint("2015-04-26", checkpointLocation = tempdir())
4+
5+
## ---- eval=FALSE---------------------------------------------------------
6+
# library(checkpoint)
7+
# checkpoint("2015-04-26", checkpointLocation = tempdir())
8+
#
9+
# library(MASS)
10+
# hist(islands)
11+
# truehist(islands)
12+
13+
## ----setup, include=FALSE------------------------------------------------
14+
15+
## Create temporary project and set working directory
16+
17+
example_project <- tempdir()
18+
19+
dir.create(example_project, recursive = TRUE)
20+
unlink("~/.checkpoint/2015-04-26", recursive=TRUE)
21+
oldRepos <- getOption("repos")
22+
oldLibPaths <- .libPaths()
23+
24+
25+
## Write dummy code file to project
26+
27+
example_code <- '
28+
library(checkpoint)
29+
checkpoint("2015-04-26", checkpointLocation = tempdir())
30+
31+
library(MASS)
32+
hist(islands)
33+
truehist(islands)
34+
'
35+
36+
cat(example_code, file = file.path(example_project, "checkpoint_example_code.R"))
37+
38+
39+
## ----checkpoint----------------------------------------------------------
40+
## Create a checkpoint by specifying a snapshot date
41+
42+
library(checkpoint)
43+
dir.create(file.path(tempdir(), ".checkpoint"))
44+
checkpoint("2015-04-26", project = example_project, checkpointLocation = tempdir())
45+
46+
## ----inspect-1-----------------------------------------------------------
47+
getOption("repos")
48+
49+
## ----inspect-2-----------------------------------------------------------
50+
normalizePath(.libPaths(), winslash = "/")
51+
52+
## ----inspect-3-----------------------------------------------------------
53+
installed.packages()[, "Package"]
54+
55+
## ----cleanup, include=FALSE----------------------------------------------
56+
## cleanup
57+
58+
unlink(example_project, recursive = TRUE)
59+
options(repos = oldRepos)
60+
.libPaths(oldLibPaths)
61+

vignettes/checkpoint.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RRT is a collection of R packages and the checkpoint server that together make y
2323

2424
### The checkpoint server
2525

26-
To achieve reproducibility, daily snapshots of CRAN are stored on our checkpoint server. At midnight UTC each day, our [mirror](http://cran.revolutionanalytics.com/) of Austria CRAN is refreshed. When the rsync process is complete, the checkpoint server takes and stores a snapshot of the CRAN mirror as it was at that very moment. These daily snapshots can then be accessed on the [MRAN website](http://mran.microsoft.com/snapshot) or using the `checkpoint` package, which installs and consistently use these packages just as they existed at midnight UTC on a specified snapshot date. Daily snapshots are available as far back as `2014-09-17`. For more information, visit the [checkpoint server GitHub site](https://github.com/RevolutionAnalytics/checkpoint-server).
26+
To achieve reproducibility, daily snapshots of CRAN are stored on our checkpoint server. At midnight UTC each day, our [mirror](http://mran.microsoft.com/) of Austria CRAN is refreshed. When the rsync process is complete, the checkpoint server takes and stores a snapshot of the CRAN mirror as it was at that very moment. These daily snapshots can then be accessed on the [MRAN website](http://mran.microsoft.com/snapshot) or using the `checkpoint` package, which installs and consistently use these packages just as they existed at midnight UTC on a specified snapshot date. Daily snapshots are available as far back as `2014-09-17`. For more information, visit the [checkpoint server GitHub site](https://github.com/RevolutionAnalytics/checkpoint-server).
2727

2828
![checkpoint server](checkpoint-server.png)
2929

vignettes/checkpoint.html

Lines changed: 206 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)