Skip to main content

Module description

Module description 

Source
Expand description

Parser for R package DESCRIPTION files (Debian Control File format).

The DCF format is simple:

  • Lines of the form Field: Value introduce a new field
  • Continuation lines start with whitespace and append to the current field
  • Blank lines separate stanzas (DESCRIPTION files have exactly one stanza)
  • # comments are NOT supported in DCF (unlike NAMESPACE)

Dependency fields (Depends, Imports, Suggests, LinkingTo) contain comma-separated package names with optional version constraints like Matrix (>= 1.2-0).

Structsยง

Dependency
A single dependency entry, e.g. Matrix (>= 1.2-0).
PackageDescription
A parsed R package DESCRIPTION file.

Enumsยง

DescriptionError
Errors that can occur when parsing a DESCRIPTION file.

Functionsยง

parse_dcf ๐Ÿ”’
Parse DCF (Debian Control File) format into a field map.
parse_dependency_list ๐Ÿ”’
Parse a comma-separated dependency list like R (>= 3.5.0), dplyr, Matrix (>= 1.2-0).
parse_single_dependency ๐Ÿ”’
Parse a single dependency entry like Matrix (>= 1.2-0) or just dplyr.