Nf | R Documentation |
Encode a vector x to a factor and then to a numeric value. It's a simple shortcut for as.numeric(factor(x, ...))
Nf(x, ...)
x |
a vector of data, usually taking a small number of distinct values. |
... |
the dots are passed on to |
numeric vector
Andri Signorell <andri@signorell.net>
N
x <- LETTERS[10:15]
Nf(x)
# same as ..
as.numeric(factor(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.