add_missing_endmark: Add Missing Endmarks

Description Usage Arguments Value Examples

View source: R/add_missing_endmark.R

Description

Detect missing endmarks and replace with the desired symbol.

Usage

1
add_missing_endmark(x, replacement = "|", endmarks = c("?", ".", "!"), ...)

Arguments

x

The text variable.

replacement

Character string equal in length to pattern or of length one which are a replacement for matched pattern.

endmarks

The potential ending punctuation marks.

...

Additional arguments passed to has_endmark.

Value

Returns a vector with missing endmarks added.

Examples

1
2
3
4
5
6
7
8
x <- c(
    "This in a", 
    "I am funny!", 
    "An ending of sorts%", 
    "What do you want?"
)

add_missing_endmark(x)

Example output

[1] "This in a|"           "I am funny!"          "An ending of sorts%|"
[4] "What do you want?"   

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