Description Usage Arguments Details Value
This is a Rcpp implementation of R's as.integer(as.factor(strings)) - 1
1 | str2int(s, out)
|
s |
(vector of strings) |
out |
(vector of integers; this is filled out by the method; same length as s) |
ie, it converts strings into integers (0-based) the conversion maintains the natural ordering (the first string is 0, the next new string i 1, ... )
returns number of unique elements
number of distinct/unique strings
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.