X5 <- factor(X5,d) in r code example
Example: factor in r
# This returns a character vector, the as.numeric() function
# is still required to convert the values to the proper type (numeric).
f <- levels(f)[f]
f <- as.numeric(f)
# This returns a character vector, the as.numeric() function
# is still required to convert the values to the proper type (numeric).
f <- levels(f)[f]
f <- as.numeric(f)