Skip to content

Commit 1b5068f

Browse files
committed
minor touchup to reference version checker
1 parent 33a0d9f commit 1b5068f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vignettes/getCurrentVersionsOfCitedPackages.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ con <- pipe(cmd)
66
pkgs <- readLines(pipe(cmd))
77
close(con)
88

9-
repo <- "http://cran.rstudio.com"
9+
repo <- "https://cloud.r-project.org"
1010
AP <- available.packages(contrib.url(repo),filter=list()) # available package at CRAN
1111

1212
res <- as.data.frame(do.call(rbind, lapply(pkgs, function(p) {
1313
ind <- which(AP[,"Package"] == p)
14+
if (length(ind) > 1) ind <- ind[1]
1415
AP[ind, c("Package", "Version")]
1516
})))
1617
print(res)

0 commit comments

Comments
 (0)