remove_unacceptable_characters: Remove unacceptable characters

View source: R/text-cleaning.R

remove_unacceptable_charactersR Documentation

Remove unacceptable characters

Description

The primary goal for this function is to clean up entity names, which may only contain: letters, numbers, spaces, underscores, hyphens, periods, plus signs, apostrophes, and parentheses. Anything outside of this list is considered an 'unacceptable character'. This will fix anything included in [porTools::hacky_cleaning()]. Additionally, it will fix ':' (replaced with hyphen), ';' (replaced with period), '/' (replaced with space), ',' (removed), square brackets (removed), and &', '&', amp;' (all replaced with 'and').

Usage

remove_unacceptable_characters(text)

Arguments

text

String, or vector of strings, that might have unacceptable characters.

Value

The text with replacement, if needed.


Sage-Bionetworks/porTools documentation built on Nov. 24, 2024, 10:22 a.m.