Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

add_missing_endmark

Add Missing Endmarks


Description

Detect missing endmarks and replace with the desired symbol.

Usage

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

x <- c(
    "This in a", 
    "I am funny!", 
    "An ending of sorts%", 
    "What do you want?"
)

add_missing_endmark(x)

textclean

Text Cleaning Tools

v0.9.3
GPL-2
Authors
Tyler Rinker [aut, cre], ctwheels StackOverflow [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.