Skip to contents

Reads the two forms R writes. sessionInfo() lists name_version items under "other attached packages:" and "loaded via a namespace", on lines starting with an index such as [1]. sessioninfo::session_info() and devtools::session_info() write a table with a header row starting package * version date. Text that has neither heading gives no rows, so a README that mentions an R version is not taken for a list of packages. A ## or > before each line, as in a knitted document, is ignored. Packages that are part of R itself (stats, compiler) are left out.

Usage

.code_session_packages(txt)

Arguments

txt

character vector with one line per element

Value

a data frame package, version, source (GitHub, Bioconductor, Local, Repository, or NA for sessionInfo(), which does not say) and remote ("user/repo@ref" for GitHub, else NA)