Error: (list) object cannot be coerced to type 'double'

Error: (list) object cannot be coerced to type 'double’的問題解決方案

> data5b2<-as.numeric(data5b1)
Error: (list) object cannot be coerced to type 'double'

想要一個數據框裏的左右數據轉化爲數值型時,出現以下報錯

Error: (list) object cannot be coerced to type 'double'

通過**unlist()**函數完美解決

> data5b2<-as.numeric(unlist(data5b1))
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章