end_inc: Test for Incomplete Sentences

Description Usage Arguments Value Examples

View source: R/end_inc.R

Description

Test for incomplete sentences and optionally remove them.

Usage

1
end_inc(dataframe, text.var, warning.report = TRUE, which.mode = FALSE)

Arguments

dataframe

A dataframe that contains the person and text variable.

text.var

A character string of the text variable.

warning.report

logical. If TRUE prints a warning of regarding removal of incomplete sentences.

which.mode

logical. If TRUE outputs two logical vectors: 'NOT' (logical test of not being an incomplete sentence) and 'INC' (logical test of being an incomplete sentence)

Value

Generates a dataframe with incomplete sentences removed.

Examples

1
2
3
4
5
6
7
8
## Not run: 
dat <- sentSplit(DATA, "state", stem.col = FALSE)
dat$state[c(2, 5)] <- paste(strip(dat$state[c(2, 5)]), "|")
end_inc(dat, "state")
end_inc(dat, "state", warning.report = FALSE)
end_inc(dat, "state", which.mode = TRUE)

## End(Not run)

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