Learn R Programming

risk.assessr (version 3.0.1)

get_session_dependencies: Get Dependencies

Description

This function extracts the version information of imported and suggested packages for a given package from the current R session.

Usage

get_session_dependencies(deps_list)

Value

A list with two elements:

imports

A named list of packages in the "Imports" section along with their corresponding versions

suggests

A named list of packages in the "Suggests" section along with their corresponding versions

Arguments

deps_list

A data frame containing the dependency information of the package (provided by calc_dependencies function)

Examples

Run this code
# \donttest{
deps_list <- data.frame(
  package = c("dplyr", "ggplot2", "testthat", "knitr"),
  type = c("Imports", "Imports", "Suggests", "Suggests")
)
get_session_dependencies(deps_list)
# }

Run the code above in your browser using DataLab