powered by
Convert variable to integer avoiding potential issues with factors
as_integer(x)
Input variable
Integer
# NOT RUN { as_integer(rnorm(10)) as_integer(letters) as_integer(as.factor(5:10)) as.integer(as.factor(5:10)) as_integer(c("a","b")) # }
Run the code above in your browser using DataLab