powered by
Count tokens by splitting strings
countTokens(str, split = "\t", ...)
Integer vector: count of tokens in the strings
A character string vector
Character used to split the strings
Other parameters passed to the strsplit function
strsplit
Jitao David Zhang <jitao_david.zhang@roche.com>
strsplit to split strings, or a convenient wrapper strtoken in this package.
strtoken
myStrings <- c("HSV\t1887\tFavorite", "FCB\t1900", "FCK\t1948") countTokens(myStrings) ## the function deals with factors as well countTokens(factor(myStrings))
Run the code above in your browser using DataLab