pseudo_id | R Documentation |
Transforms a vector into an integer of IDs.
pseudo_id(x, ...)
## S3 method for class 'pseudo_id'
pseudo_id(x, ...)
## Default S3 method:
pseudo_id(x, na_last = TRUE, ...)
## S3 method for class 'factor'
pseudo_id(x, ...)
x |
A vector of values |
... |
Additional arguments passed to methods |
na_last |
|
A pseudo_id
object where the integer
value of the vector
correspond to the position of the unique values in the attribute "uniques"
.
set.seed(42)
(x <- sample(letters, 10, TRUE))
(pid <- pseudo_id(x))
attr(pid, "uniques")[pid]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.