Skip to content

Commit

Permalink
More reliable way of getting number of stringi functions
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Feb 12, 2016
1 parent 616cad0 commit c87c503
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion strings.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ There are a few other functions in base R that accept regular expressions:
### The stringi package
stringr is built on top of the __stringi__ package. stringr is useful when you're learning because it exposes a minimal set of functions, that have been carefully picked to handle the most common string manipulation functions. stringi on the other hand is designed to be comprehensive. It contains almost every function you might ever need. stringi has `r length(ls("package:stringi"))` functions to stringr's `r length(ls("package:stringr"))`.
stringr is built on top of the __stringi__ package. stringr is useful when you're learning because it exposes a minimal set of functions, that have been carefully picked to handle the most common string manipulation functions. stringi on the other hand is designed to be comprehensive. It contains almost every function you might ever need. stringi has `r length(ls(getNamespace("stringi")))` functions to stringr's `r length(ls("package:stringr"))`.
So if you find yourself struggling to do something that doesn't seem natural in stringr, it's worth taking a look at stringi. The use of the two packages is very similar because stringr was designed to mimic stringi's interface. The main difference is the prefix: `str_` vs `stri_`.
Expand Down

0 comments on commit c87c503

Please sign in to comment.