vt_scrape_section: Retrieve the value block of a custom section tagged via...

View source: R/scrape_section.R

vt_scrape_sectionR Documentation

Retrieve the value block of a custom section tagged via roxygen2

Description

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)

roxy_block2 <- paste0("#' ", roxy_block1)
vt_scrape_section("Last updated date:", roxy_block2)

phuse-org/valtools documentation built on Nov. 10, 2024, 1:36 a.m.