replace_incomplete: Denote Incomplete End Marks With "|"

Description Usage Arguments Value Examples

View source: R/replace_incomplete.R

Description

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

Usage

1
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 incomplete sentence marks (.., ..., .?, ..?, en & em dash etc.) replaced with "|".

Examples

1
2
3
x <- c("the...",  "I.?", "you.", "threw..", "we?")
replace_incomplete(x)
replace_incomplete(x, '...')

Example output

[1] "the|"   "I|"     "you."   "threw|" "we?"   
[1] "the..."   "I..."     "you."     "threw..." "we?"     

textclean documentation built on May 2, 2019, 7:22 a.m.