trinker / qdap

Quantitative Discourse Analysis Package: Bridging the gap between qualitative data and quantitative analysis
http://cran.us.r-project.org/web/packages/qdap/index.html
175 stars 44 forks source link

Error handling multiple asterisk #128

Closed trinker closed 11 years ago

trinker commented 11 years ago

This:

(dat2 <- data.frame(dialogue=c("@bryan is bryan good @br",
    "indeed", "@ **** brian"), person=qcv(A, B, A)))

with(dat2, termco(dialogue, person, match.list="**"))
with(dat2, termco(dialogue, person, match.list="***"))

Gives:

## > with(dat2, termco(dialogue, person, match.list="**"))
##   person word.count        **
## 1      A          6 2(33.33%)
## 2      B          1         0
## > with(dat2, termco(dialogue, person, match.list="***"))
## Error in gsub(paste0(".*?($|'|", paste(paste0("\\", char.keep), collapse = "|"),  : 
##   invalid regular expression '.*?($|'|\*|\***|[^[:punct:]]).*?', reason 'Invalid use of repetition operators'