Rdpack (version 0.4-20)

Rdo_empty_sections: 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

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.

Details

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

Examples

Run this code
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)

Run the code above in your browser using DataCamp Workspace