powered by
This method returns the number of tokens in an object.
n_tokens(x, ...)# S3 method for freqlist n_tokens(x, ...)# S3 method for tokens n_tokens(x, ...)
# S3 method for freqlist n_tokens(x, ...)
# S3 method for tokens n_tokens(x, ...)
A number.
An object of any of the classes for which the method is implemented.
Additional arguments.
Other getters and setters: n_types(), orig_ranks(), ranks(), tot_n_tokens(), type_names()
n_types()
orig_ranks()
ranks()
tot_n_tokens()
type_names()
(tks <- tokenize("The old man and the sea.")) n_tokens(tks) (flist <- freqlist(tks)) n_tokens(flist) n_types(flist)
Run the code above in your browser using DataLab