imperative | R Documentation |
Automatic imperative remarking.
imperative(
dataframe,
person.var,
text.var,
lock.incomplete = FALSE,
additional.names = NULL,
parallel = FALSE,
warning = FALSE
)
dataframe |
A data.frame object. |
person.var |
The person variable. |
text.var |
The text variable. |
lock.incomplete |
logical. If |
additional.names |
Additional names that may be used in a command (people in the context that do not speak). |
parallel |
logical. If |
warning |
logical. If |
Returns a dataframe with a text variable indicating imperative sentences. Imperative sentences are marked with * followed by the original end mark.
The algorithm used by imperative
is
sensitive to English language dialects and types. Commas can indicate a
choppy sentence and may indicate a false positive. Sentences marked with
'AAVE' may be the use of African American Vernacular English and not an
imperative sentence.
## Not run:
dat <- data.frame(name=c("sue", rep(c("greg", "tyler", "phil",
"sue"), 2)), statement=c("go get it|", "I hate to read.",
"Stop running!", "I like it!", "You are terrible!", "Don't!",
"Greg, go to the red, brick office.", "Tyler go to the gym.",
"Alex don't run."), stringsAsFactors = FALSE)
imperative(dat, "name", "statement", , c("Alex"))
imperative(dat, "name", "statement", lock.incomplete = TRUE, c("Alex"))
imperative(dat, "name", "statement", , c("Alex"), warning=TRUE)
imperative(dat, "name", "statement", , c("Alex"), warning=TRUE,
parallel = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.