Learn R Programming

textclean (version 0.3.0)

replace_incomplete: Denote replace_incompletelete End Marks With "|"

Description

Replaces replace_incompletelete sentence end marks (.., ..., .?, ..?, en & em dash etc.) with "|".

Usage

replace_incomplete(x, replacement = "|", ...)

Arguments

x
The text variable.
replacement
A string to replace incomplete punctuation marks with.
...
ignored.

Value

Returns a text variable (character sting) with replace_incompletelete sentence marks (.., ..., .?, ..?, en & em dash etc.) replaced with "|". If scan mode is TRUE returns a data frame with replace_incompletelete sentence location.

Examples

Run this code
x <- c("the...",  "I.?", "you.", "threw..", "we?")
replace_incomplete(x)
replace_incomplete(x, '...')

Run the code above in your browser using DataLab