powered by
Select only documents that are unique/distinct with respect to values of their document variables.
# S3 method for corpus distinct(.data, ..., .keep_all = FALSE)
A corpus containing only documents with unique combinations of the specified document variables.
a corpus object with document variables
comma-separated list of unquoted document variables, or expressions involving document variables
If TRUE, keep all variables in .data. If a combination of ... is not distinct, this keeps the first row of values.
TRUE
.data
...
distinct(data_corpus_inaugural[1:5], President) %>% summary() distinct(data_corpus_inaugural[1:5], President, .keep_all = TRUE) %>% summary()
Run the code above in your browser using DataLab