Parse a sessionInfo object

parse_si(si, source = "filename")

Arguments

si

Character string, with either the path to the plain text file containing the output (if source is equal to "filename"), or the content itself (if source is "editor")

source

Character string, indicating the format in which the object is provided

Value

A list with two elements:

  • a character string, Rversion

  • a data frame (packages) with the attached packages and their versions

Details

The output of sessionInfo() should start with > sessionInfo(), so be sure to copy that part as well

Examples

si1_output <- system.file("extdata", "si1.txt", package = "sessionDiffo") si1 <- parse_si(si1_output)
#> [1] "yes"