R/parsePkgVersions.R
parsePkgVersions.Rd
The function parses the R version and R package versions from
session information (created by sessionInfo()
, tested with R 3.6) in
files provided in infiles
. Two types of files are currently
supported:
Files containing R console output
(created by R CMD BATCH script.R output.Rout
Files
containing markdown output created by rmarkdown::render('input.Rmd',
clean = FALSE)
, which will keep the intermediate .md
file.
parsePkgVersions(infiles)
A list
of list
s with one element in the outer list for
each R version, contianing an innter list with elements files
and
packages
.
f <- list.files(system.file("extdata", "parsePkgVersions",
package = "swissknife"),
full.names = TRUE)
parsePkgVersions(f)
#> $`R version 3.6.0 (2019-04-26)`
#> $`R version 3.6.0 (2019-04-26)`$files
#> [1] "/home/runner/work/_temp/Library/swissknife/extdata/parsePkgVersions/example.md"
#>
#> $`R version 3.6.0 (2019-04-26)`$packages
#> [1] "Biobase_2.44.0" "BiocGenerics_0.30.0"
#> [3] "BiocParallel_1.18.0" "DelayedArray_0.10.0"
#> [5] "DropletUtils_1.4.2" "GenomeInfoDb_1.20.0"
#> [7] "GenomicRanges_1.36.0" "IRanges_2.18.1"
#> [9] "RColorBrewer_1.1-2" "S4Vectors_0.22.0"
#> [11] "SingleCellExperiment_1.6.0" "SummarizedExperiment_1.14.0"
#> [13] "dplyr_0.8.3" "ggplot2_3.2.0"
#> [15] "matrixStats_0.54.0" "scater_1.12.2"
#> [17] "scran_1.12.1" "sctransform_0.2.0"
#> [19] "stringr_1.4.0" "swissknife_0.12"
#> [21] "tibble_2.1.3" "tidyr_0.8.3"
#> [23] "umap_0.2.2.0"
#>
#>
#> $`R version 3.6.1 (2019-07-05)`
#> $`R version 3.6.1 (2019-07-05)`$files
#> [1] "/home/runner/work/_temp/Library/swissknife/extdata/parsePkgVersions/example.Rout"
#>
#> $`R version 3.6.1 (2019-07-05)`$packages
#> [1] "Biobase_2.44.0" "BiocGenerics_0.30.0"
#> [3] "BiocParallel_1.18.1" "DelayedArray_0.10.0"
#> [5] "GenomeInfoDb_1.20.0" "GenomicRanges_1.36.1"
#> [7] "IRanges_2.18.3" "Matrix_1.2-17"
#> [9] "RColorBrewer_1.1-2" "S4Vectors_0.22.1"
#> [11] "SingleCellExperiment_1.6.0" "SummarizedExperiment_1.14.1"
#> [13] "dplyr_0.8.3" "matrixStats_0.55.0"
#> [15] "tibble_2.1.3" "tidyr_1.0.0"
#> [17] "velocyto.R_0.6"
#>
#>