powered by
This function replaces symbols with word equivalents (e.g., @ becomes "at".
@
"at"
replace_symbol(text.var, dollar = TRUE, percent = TRUE, pound = TRUE, at = TRUE, and = TRUE, with = TRUE)
The text variable.
logical. If TRUE replaces dollar sign ($) with "dollar".
TRUE
"dollar"
logical. If TRUE replaces percent sign (%) with "percent".
"percent"
logical. If TRUE replaces pound sign (#) with "number".
"number"
logical. If TRUE replaces at sign (@) with "at".
logical. If TRUE replaces and sign (&) with "and".
"and"
logical. If TRUE replaces with sign (w/) with "with".
"with"
Returns a character vector with symbols replaced..
bracketX, qprep, replace_abbreviation, replace_contraction, replace_number,
bracketX
qprep
replace_abbreviation
replace_contraction
replace_number
# NOT RUN { x <- c("I am @ Jon's & Jim's w/ Marry", "I owe $41 for food", "two is 10% of a #") replace_symbol(x) # }
Run the code above in your browser using DataLab