Learn R Programming

redcapAPI (version 2.8.0)

stringCleanup: 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)

Value

stripHTMLTags returns a character vector.

stripUnicode returns a character vector.

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.

Examples

Run this code
stripHTMLTags("Text in a paragraph tag with bold formatting ")

stripUnicode("\U00B5 = 0")

Run the code above in your browser using DataLab