Skip to contents

Looks for the value in a custom roxygen sections. Custom sections are named using @section <NAME>:, where colon is use to indicate end of the name, and value starts on next line.

Usage

vt_scrape_section(tag, block)

Arguments

tag

name of the section, case insensitive.

block

character vector that holds the documentation block. #' may be present or omitted.

Value

section value

Last Updated By

Marie Vendettuoli

Last Updated Date

2021-02-18

Examples

roxy_block1 <- c("@title Title1", "@param param1 definition",
    "@section Last updated date:", "2021-01-01", "@importFrom utils sessionInfo",
    "@export" )
vt_scrape_section("Last updated date:", roxy_block1)
#> [1] "2021-01-01"

roxy_block2 <- paste0("#' ", roxy_block1)
vt_scrape_section("Last updated date:", roxy_block2)
#> [1] "2021-01-01"