desc (version 1.2.0)

desc_get_field: Get a single field from a DESCRIPTION file, fail if not found

Description

Get a single field from a DESCRIPTION file, fail if not found

Usage

desc_get_field(key, default = stop("Field '", key, "' not found"),
  trim_ws = TRUE, file = ".")

desc_get_or_fail(keys, file = ".")

Arguments

key

The field to query.

default

Value to return if key is not found. By default it throws an error.

trim_ws

Whether to trim leading and trailing whitespace from the value. Defaults to TRUE.

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.

keys

Character vector of fields to get.

Value

Character string, the value of key, or default if key is not found and default is specified.

See Also

Other simple queries: desc_del, desc_fields, desc_get, desc_has_fields, desc_set