stringCleanup {redcapAPI}R Documentation

Remove Undesired Characters From Strings

Description

These functions are utilities to clear undesired characters from REDCap output.

Usage

stripHTMLTags(
  x,
  tags = c("p", "br", "div", "span", "b", "font", "sup", "sub"),
  ignore.case = TRUE
)

stripUnicode(x)

Arguments

x

character, vector of content to be cleaned.

tags

character, vector of HTML tags to remove from x

ignore.case

logical(1), should cases be ignored when matching patterns? Defaults to TRUE.

Value

stripHTMLTags returns a character vector.

stripUnicode returns a character vector.

Examples

stripHTMLTags("<p>Text in a paragraph <b>tag</b> with bold formatting </p>")

stripUnicode("\U00B5 = 0")


[Package redcapAPI version 2.9.1 Index]