遵循 Hadley Wickham在第 2.4 节中的“探索数据和模型的实用工具”示例,我得到了铸造熔融数据Error: could not find function "cast"
。我已经安装并加载了 reshape2 包。
> cast(msmithsm, time + subject ~ variable)
Error: could not find function "cast"
遵循 Hadley Wickham在第 2.4 节中的“探索数据和模型的实用工具”示例,我得到了铸造熔融数据Error: could not find function "cast"
。我已经安装并加载了 reshape2 包。
> cast(msmithsm, time + subject ~ variable)
Error: could not find function "cast"
在reshape2中,cast()
已被两个函数替换:acast()
和dcast()
.
从?cast
,在reshape2包中:
描述:
根据您想要矢量/矩阵/数组输出还是数据帧输出,使用“acast”或“dcast”。
有相关问题(错误:找不到函数“dcast”)。我有旧图书馆,图书馆(plyr),所以只是添加到代码中......
install.packages("reshape2") # may already be installed
library(reshape2)
然后 dcast 再次工作