how to convert in r [1] "numeric" code example
Example 1: R factors as numeric
as.numeric(levels(f))[f] # f being the factor column
Example 2: r - transform as factor
df$myvar <- as.numeric(as.character(df$myvar))
df$myvar <- as.factor(df$myvar)