st_notes_sub: Edit lines in table notes

View source: R/table-object.R

st_notes_subR Documentation

Edit lines in table notes

Description

This function allows the replacement of an entire line in table notes. The line which is replaced is matched by a regular expression or identified directly with the integer position in the notes vector to replace.

Usage

st_notes_sub(x, where, replacement, fixed = FALSE)

Arguments

x

an stobject.

where

a regular expression for finding a line in table notes to replace; alternatively, this can be an integer specifying the line to replace.

replacement

the replacement text for line matching by where.

fixed

passed to grep() when where is character.

Details

A warning is generated if there are no notes already existing in x. A warning is also generated if a regular expression fails to match any lines. In case multiple lines are matched, only the first matching line is substituted.

Value

An updated object with class stobject, which can be piped to other functions.


metrumresearchgroup/pmtables documentation built on Dec. 22, 2024, 1:34 a.m.