powered by
Use to clean text variables when importing a new data set. Removes extra white spaces other textual anomalies that may cause errors.
scrubber(text.var, num2word = FALSE, rm.quote = TRUE, fix.comma = TRUE, fix.space = TRUE, ...)
The text variable.
logical If TRUE replaces a numbers with text representations.
TRUE
logical If TRUE removes any \".
\"
logical If TRUE removes any spaces before a comma.
logical. If TRUE extra spaces before endmarks are removed.
Other arguments passed to replace_number.
replace_number
Returns a parsed character vector.
strip
# NOT RUN { x <- c("I like 456 dogs\t , don't you?", 'The end"') scrubber(x) scrubber(x, TRUE) # }
Run the code above in your browser using DataLab