如何更改以下矩阵中的数字类别,将“果实”更改为字符
中的数字> fruits
June July August September October November December
Apple "809936" "901956" "1311202" "1121499" "711812" "79647" "0"
Mango "663300" "667529" "669158" "664627" "657280" "78982" "0"
Banana "484458" "436396" "475879" "496827" "507660" "54120" "0"
答案 0 :(得分:1)
如果m
是您的矩阵,您可以尝试:
`class<-`(m, 'numeric')