scrubber: Clean Imported Text

Description Usage Arguments Value See Also Examples

Description

Use to clean text variables when importing a new data set. Removes extra white spaces other textual anomalies that may cause errors.

Usage

1
2
  scrubber(text.var, num2word = FALSE, rm.quote = TRUE,
    fix.comma = TRUE, ...)

Arguments

text.var

The text variable.

num2word

logical If TRUE replaces a numbers with text representations.

fix.comma

logical If TRUE removes any spaces before a comma.

rm.quote

logical If TRUE removes and \".

...

Other arguments passed to replace_number.

Value

Returns a parsed character vector.

See Also

strip

Examples

1
2
3
x <- c("I like 456 dogs\t  , don't you?\"")
scrubber(x)
scrubber(x, TRUE)

trinker/qdap2 documentation built on May 31, 2019, 9:47 p.m.