-
Notifications
You must be signed in to change notification settings - Fork 0
/
hash.Rmd
61 lines (52 loc) · 2.22 KB
/
hash.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
```{r echo = FALSE, results = "hide"}
format_mb <- function(x) paste(round(x / (2 ** 20), 1), "MB")
BRANCH <- Sys.getenv("APPVEYOR_REPO_BRANCH")
REF <- Sys.getenv("APPVEYOR_REPO_COMMIT")
MD5_tar_gz <- tools::md5sum("R.tar.gz")
size_tar_gz <- file.info("R.tar.gz")$size
size_tar <- as.numeric(scan(pipe("gzip -l -q R.tar.gz"), character())[[2]])
MD5_iso_gz <- tools::md5sum("R.iso.gz")
size_iso_gz <- file.info("R.iso.gz")$size
size_iso <- file.info("R.iso")$size
MD5_vhd_gz <- tools::md5sum("R.vhd.gz")
size_vhd_gz <- file.info("R.vhd.gz")$size
size_vhd <- file.info("R.vhd")$size
```
r-portable image information `r if (BRANCH != "master") sprintf("(branch: %s)", BRANCH)`
==========
- [R.tar.gz](https://rportable.blob.core.windows.net/r-portable/`r BRANCH`/R.tar.gz) (`r format_mb(size_tar_gz)`, MD5 hash: ``r MD5_tar_gz``, uncompressed `r format_mb(size_tar)`)
- [R.iso.gz](https://rportable.blob.core.windows.net/r-portable/`r BRANCH`/R.iso.gz) (`r format_mb(size_iso_gz)`, MD5 hash: ``r MD5_iso_gz``, uncompressed `r format_mb(size_iso)`)
- [R.vhd.gz](https://rportable.blob.core.windows.net/r-portable/`r BRANCH`/R.vhd.gz) (`r format_mb(size_vhd_gz)`, MD5 hash: ``r MD5_vhd_gz``, uncompressed `r format_mb(size_vhd)`)
```{r echo = FALSE, results = "hide"}
format_mb <- function(x) paste(round(x / (2 ** 20), 1), "MB")
BRANCH <- Sys.getenv("APPVEYOR_REPO_BRANCH")
REF <- Sys.getenv("APPVEYOR_REPO_COMMIT")
```
## Contents
### R version
```{r echo = FALSE, results = "asis"}
cat(R.Version()$version.string)
```
### Package versions
```{r echo = FALSE, results = "asis"}
pkgs <- as.data.frame(installed.packages(), stringsAsFactors = FALSE)[c("Package", "Version", "Priority")]
pkgs <- plyr::arrange(pkgs, Priority, Package)
pkgs$Priority[is.na(pkgs$Priority)] <- "other"
pkgs$Priority <- factor(pkgs$Priority, levels = c("base", "recommended", "other"))
plyr::d_ply(
plyr::unrowname(pkgs),
"Priority",
function (sub_pkgs) {
cat("#### ", as.character(sub_pkgs$Priority[1]), "\n")
s <- plyr::dlply(
sub_pkgs,
"Package",
function(pkg) {
sprintf("[`%s`](http://cran.r-project.org/package=%s) (%s)", pkg$Package, pkg$Package, pkg$Version)
}
)
cat(paste(unlist(s), collapse = ",\n"), "\n")
NULL
}
)
```