trinker / termco

Regular Expression Counts of Terms and Substrings
Other
25 stars 5 forks source link

Either warn + drop, stop w/ good error, or drop silently dupes in the same search.terms vector #39

Closed trinker closed 7 years ago

trinker commented 7 years ago
personal.pronouns <- c("I", "me", "we", "us", "you", "you", "she", "he", "her", "him", 
"it", "they", "them")

termco::token_count(DATA$state, DATA$code, list(pp = tolower(personal.pronouns)), keep.punctuation = FALSE)
## Error in `[.simple_triplet_matrix`(dtm, , x) : 
##   Repeated indices currently not allowed.

termco::token_count(DATA$state, DATA$code, list(pp = unique(tolower(personal.pronouns))), keep.punctuation = FALSE)