add_incomplete: Detect Incomplete Sentences; Add | Endmark

Description Usage Arguments Value Examples

View source: R/add_incomplete.R

Description

Automatically detect missing endmarks and replace with the | endmark symbol to indicate an incomplete sentence.

Usage

1
add_incomplete(text.var, endmarks = "[.?|!]+$", silent = FALSE)

Arguments

text.var

The text variable.

endmarks

A reguar expression to check for endmarks.

silent

logical. If TRUE messages are not printed out.

Value

Returns a vector with missing endmarks replaced with |.

Examples

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

trinker/qdap documentation built on Sept. 30, 2020, 6:28 p.m.