as_integer | R Documentation |
Convert variable to integer avoiding potential issues with factors
as_integer(x)
x |
Input variable |
Integer
as_integer(rnorm(10))
as_integer(letters)
as_integer(as.factor(5:10))
as.integer(as.factor(5:10))
as_integer(c("a", "b"))
as_integer(c("0", "1"))
as_integer(as.factor(c("0", "1")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.