stringr vs. stringi

2,332 views
Skip to first unread message

Bob

unread,
Dec 24, 2014, 2:32:28 PM12/24/14
to manip...@googlegroups.com
Hi All,

I've used stringr extensively and just came across stringi:

Has anyone used both? If so, I'd love to hear how they compare.

Thanks,
Bob

Ista Zahn

unread,
Dec 24, 2014, 3:44:40 PM12/24/14
to Bob, manip...@googlegroups.com

I've used both, but neither extensively. My impression is that stringi provides most (all?) of the functionality of stringr plus encoding conversion and basic transliteration.

--
You received this message because you are subscribed to the Google Groups "manipulatr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to manipulatr+...@googlegroups.com.
To post to this group, send email to manip...@googlegroups.com.
Visit this group at http://groups.google.com/group/manipulatr.
For more options, visit https://groups.google.com/d/optout.

Bryan Hanson

unread,
Dec 24, 2014, 4:04:17 PM12/24/14
to Ista Zahn, Bob, manip...@googlegroups.com
Hadley recently sent out this message to maintainers of packages that use stringr.  So there is considerable overlap.  Bryan

Hi all,

I'm planning on releasing a new version of stringr early next year.
This version is considerably more awesome because it now uses the
fantastic stringi version as the backend. This should make stringr
both considerably faster and more correct.  You can install the dev
version with:

devtools::install_github("Rexamine/stringi")
devtools::install_github("hadley/stringr”)

[part of msg not included]

Bob

unread,
Dec 26, 2014, 9:21:03 AM12/26/14
to manip...@googlegroups.com, ista...@gmail.com, muen...@tennessee.edu
That's great news, thanks very much!  -Bob

Hadley Wickham

unread,
Dec 28, 2014, 4:14:29 PM12/28/14
to Bryan Hanson, Ista Zahn, Bob, manipulatr
I'd basically describe the difference as: stringi provides tools to do
anything you could ever want to do with strings, where stringr
provides tools to do the most common 95% of operations. This allows
stringr to be much simpler, and the cost of some flexibility.
Additionally stringi is implemented in C using the ICU string library,
so it's very fast and very correct (it deals with unicode better than
base R).

Fortunately, stringr and stringi have very similar interfaces, so you
should be able to move up from stringr to stringi very easily. As
Bryan mentioned, the next version of stringr will use stringi, so
stringr will get all the performance benefits (and bug fixes!), and
you can continue to use the simple interface.

Hadley
http://had.co.nz/

Bob

unread,
Dec 29, 2014, 9:32:05 AM12/29/14
to manip...@googlegroups.com, han...@depauw.edu, ista...@gmail.com, muen...@tennessee.edu
Thanks!
Reply all
Reply to author
Forward
0 new messages