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.
st_notes_sub(x, where, replacement, fixed = FALSE)an stobject.
a regular expression for finding a line in table notes to replace; alternatively, this can be an integer specifying the line to replace.
the replacement text for line matching by where.
passed to grep() when where is character.
An updated object with class stobject, which can be piped to other
functions.
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.