check_text: Check Text For Potential Problems

Description Usage Arguments Value Note

View source: R/check_text.R

Description

check_text - Uncleaned text may result in errors, warnings, and incorrect results in subsequent analysis. check_text checks text for potential problems and suggests possible fixes. Potential text anomalies that are detected include: factors, missing ending punctuation, empty cells, double punctuation, non-space after comma, no alphabetic characters, non-ASCII, missing value, and potentially misspelled words.

available_check - Provide a data.frame view of all the available checks in the check_text function.

Usage

1
2
3
check_text(x, file = NULL, checks = NULL, n = 10, ...)

available_checks()

Arguments

x

The text variable.

file

A connection, or a character string naming the file to print to. If NULL prints to the console. Note that this is assigned as an attribute and passed to print.

checks

A vector of checks to include from which_are. If checks = NULL, all checks from which_are which be used. Note that all meta checks will be conducted (see which_are for details on meta checks).

n

The number of affected elements to print out (the rest are truncated).

...

ignored.

Value

Returns a list with the following potential text faults report:

Note

The output is a list containing meta checks and elemental checks but prints as a pretty formatted output with potential problem elements, the accompanying text, and possible suggestions to fix the text.


trinker/textmod documentation built on Dec. 10, 2018, 11:26 p.m.