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

added safe option in qdap::multigsub as implemented by mgsub::mgsub #247

Open bmewing opened 6 years ago

bmewing commented 6 years ago

The multigsub function admittedly doesn't enable simultaneous global string substitutions which can have some unintended effects while using it. The R package mgsub implements a simultaneous string substitution which is slower than the sequential used in qdap. This pull request adds a simultaneous flag to multigsub to enable this type of substitution. The vignette was updated as well to reflect the change. I couldn't find any tests for this function so I didn't update those (or write any)