Description Usage Arguments Value Author(s) See Also Examples
Count tokens by splitting strings
1 | countTokens(str, split = "\t", ...)
|
str |
A character string vector |
split |
Character used to split the strings |
... |
Other parameters passed to the |
Integer vector: count of tokens in the strings
Jitao David Zhang <jitao_david.zhang@roche.com>
strsplit
to split strings, or a convenient wrapper
strtoken
in this package.
1 2 3 4 5 | myStrings <- c("HSV\t1887\tFavorite", "FCB\t1900", "FCK\t1948")
countTokens(myStrings)
## the function deals with factors as well
countTokens(factor(myStrings))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.