Getting warning using setAs() to specify colClasses in R [closed]

青春壹個敷衍的年華 提交于 2020-01-11 08:18:00

问题


I tried using the answer @Greg Snow provided in this question, but I keep getting a warning regardless of what I do. Can someone help with this:?

> setAs("character","myDate",function(from) as.Date(from, format="%b %d, %Y %r"))
in method for ‘coerce’ with signature ‘"character","myDate"’: no definition for class “myDate”

I wanted to make sure that the "methods" package is load (it looks like setAs depends on it) and I got this:

> getOption("defaultPackages")
[1] "datasets"  "utils"     "grDevices" "graphics"  "stats"     "methods"

TIA

来源:https://stackoverflow.com/questions/14146341/getting-warning-using-setas-to-specify-colclasses-in-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!