orig_ranks | R Documentation |
These methods retrieve or set, for a the original ranks for the frequency
counts of an object.
These original ranks are only defined if x
is the result of a selection
procedure (i.e. if x
contains frequency counts for a selection of items
only, and not for all tokens in the corpus).
orig_ranks(x, ...) orig_ranks(x) <- value ## S3 replacement method for class 'freqlist' orig_ranks(x) <- value ## S3 method for class 'freqlist' orig_ranks(x, with_names = FALSE, ...) ## Default S3 replacement method: orig_ranks(x) <- value
x |
An object of any of the classes for which the method is implemented. |
... |
Additional arguments. |
value |
Currently it can only be |
with_names |
Logical. Whether or not the items in the output should
be given names. If |
Either NULL
or a numeric vector, representing the
original ranks, with as its names the types to which these ranks apply.
Other getters and setters:
n_tokens()
,
n_types()
,
ranks()
,
tot_n_tokens()
,
type_names()
x <- freqlist("The man and the mouse.", as_text = TRUE) x orig_ranks(x) orig_ranks(x, with_names = TRUE) y <- keep_types(x, c("man", "and")) orig_ranks(y) y orig_ranks(y) <- NULL y orig_ranks(y) tot_n_tokens(y) <- sum(y) y
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.