📜  factor in - R 编程语言代码示例

📅  最后修改于: 2022-03-11 14:51:59.855000             🧑  作者: Mango

代码示例1
# 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)