Description Usage Arguments Value See Also Examples
Converts a data.frame
of factor
s to
integers.
1 | as_integer(x, cols = NULL, fun = as.integer)
|
x |
A |
cols |
Numeric indices of the columns to incude (use |
fun |
An |
Returns a data.frame
equal to the
class
of x
with integer columns rather than factor.
1 2 3 4 5 6 7 8 9 10 11 | as_integer(r_series(likert_7, 5, 10))
as_integer(r_series(likert_7, 5, 10), cols = c(2, 4))
library(dplyr)
r_data_frame(n=100,
age,
political,
sex,
grade
) %>%
as_integer(2:3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.