desc_list: Get all 'DESCRIPTION' file fields as cleaned up list

desc_listR Documentation

Get all DESCRIPTION file fields as cleaned up list

Description

Returns all fields from a DESCRIPTION file as a named list with values cleaned up:

  • Whitespaces at the start and end of field values as well as repeated whitespaces within them are removed.

  • Multi-value fields are returned as vectors.

  • The fields Depends, Imports and Suggests are returned as a single data frame named dependencies.

Usage

desc_list(file = ".")

Arguments

file

DESCRIPTION file to use. By default the DESCRIPTION file of the current package (i.e. the package the working directory is part of) is used.

Value

A list.

See Also

Other package DESCRIPTION functions: desc_dep_vrsn(), desc_url_git(), desc_value()

Examples

fs::path_package(package = "dplyr") |> pal::desc_list()

salim-b/pal documentation built on Feb. 28, 2025, 6:51 p.m.