qdap (version 2.4.3)

add_incomplete: Detect Incomplete Sentences; Add | Endmark

Description

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

Usage

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

Run this code
# NOT RUN {
add_incomplete(
    c(
        "This in a", 
        "I am funny!", 
        "An ending of sorts%", 
        "What do you want?"
    )
)
# }

Run the code above in your browser using DataLab