R語言學習之因子轉換成數值

1.因子轉換成數值變量

d<-as.numeric(as.character(d)) #通常先轉換成字符,再轉換成數值字符

2.as.numeric()  #轉換成數值

as.character()#轉換成字符變量