remove_annotations: Remove 'annotation' sections from strings

View source: R/str_annotations.R

remove_annotationsR Documentation

Remove 'annotation' sections from strings

Description

Remove 'annotation' sections from strings

Usage

remove_annotations(x, paren = FALSE, square = FALSE, curly = FALSE, ...)

remove_paren(x, ...)

remove_curly(x, ...)

remove_square(x, ...)

replace_annotations(
  x,
  replacement,
  paren = FALSE,
  square = FALSE,
  curly = FALSE,
  ...
)

replace_paren(x, replacement, ...)

replace_curly(x, replacement, ...)

replace_square(x, replacement, ...)

extract_parentheses(x, ...)

extract_square(x, ...)

extract_curly(x, ...)

detect_parentheses(x, ...)

detect_square(x, ...)

detect_curly(x, ...)

Arguments

x

character vector

paren

match parenthetical annotations

square

match square-bracketed annotations

curly

match curly-bracketed annotations

...

passed to 'stringr::regex'

replacement

replace matched pattern with this

Value

modified vector with annotation blocks removed

Functions

  • remove_paren: remove all parenthetical phrases

  • remove_curly: remove all curly-bracketed phrases

  • remove_square: remove all square-bracketed phrases

  • replace_annotations: replace text annotations

  • replace_paren: replace all parenthetical phrases

  • replace_curly: replace all curly-bracketed phrases

  • replace_square: replace all square-bracketed phrases

  • extract_parentheses: extract all parenthetical annotations

  • extract_square: extract all square-bracketed annotations

  • extract_curly: extract all curly-bracketed annotations

  • detect_parentheses: detect parenthetical annotations

  • detect_square: detect square-bracketed annotations

  • detect_curly: detect curly-bracketed annotations


stackcon/rngt documentation built on June 17, 2022, 5:29 p.m.