[問題] R 請教density指令
請教各位前輩:
rabbit為資料集
b1為資料集裡的變項:收入
指令如下:
kwidth <- 0.2597
dens1 <- density(rabbit$b1, n = 23788, width=kwidth)
R給的錯誤訊息為:
錯誤在density.default(rabbit$b1, n = 23788, width = kwidth) :
argument 'x' must be numeric
請問應該怎麼修正,R所指的"x",才能變成數字的型態?
或者是我的指令整個有錯?
謝謝各位前輩!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 203.68.127.30
→
07/04 20:37, , 1F
07/04 20:37, 1F
→
07/04 20:52, , 2F
07/04 20:52, 2F
※ 編輯: crabstick 來自: 203.68.127.30 (07/04 22:19)
※ 編輯: crabstick 來自: 203.68.127.30 (07/04 22:20)
※ 編輯: crabstick 來自: 203.68.127.30 (07/04 22:21)
※ 編輯: crabstick 來自: 203.68.127.30 (07/07 19:17)