Rdo_empty_sections: Find or remove empty sections in Rd objects

View source: R/sections.R

Rdo_empty_sectionsR Documentation

Find or remove empty sections in Rd objects

Description

Find or remove empty sections in Rd objects

Usage

Rdo_empty_sections(rdo, with_bs = FALSE)

Rdo_drop_empty(rdo, sec = TRUE)

Arguments

rdo

an Rd object or Rd source text.

with_bs

if TRUE return the section names with the leading backslash.

sec

not used

Details

The function checkRd is used to determine which sections are empty.

Value

For Rdo_empty_sections, the names of the empty sections as a character vector.

For Rdo_drop_empty, the Rd object stripped from empty sections.

Author(s)

Georgi N. Boshnakov

Examples

dummyfun <- function(x) x
rdo8 <- list_Rd(name = "Dummyname", alias = "dummyfun",
              title = "Dummy title", description = "Dummy description",
              usage = "dummyfun(x,y)",
              value = "numeric vector",
              author = "",
              details = "",
              note = "",
              Rd_class=TRUE )

Rdo_empty_sections(rdo8)        # "details" "note"    "author"

rdo8a <- Rdo_drop_empty(rdo8)
Rdo_empty_sections(rdo8a)       # character(0)

GeoBosh/Rdpack documentation built on Nov. 11, 2023, 5:22 p.m.