[分享] don't use aggregate

楼主: celestialgod (天)   2015-11-03 09:12:25
[关键字]:
do not use aggregate
[出处]:
http://www.r-bloggers.com/dont-use-statsaggregate/
[重点摘要]:
Most base R code has problems if there are extra attributes on a numeric
array. So R-stat code tends to have a habit of dropping attributes when it
can. it is odd that the class() is kept (which itself an attribute style
structure) and the timezone is lost, but R is full of hand-specified corner
cases.
所以aggregate会把其他多于的attributes丢掉...
很多事情又要重来一次,例如date的格式之类的
总之,此篇作者非常不推荐aggregate
建议大家爱惜自己生命,使用dplyr XDD
作者: obarisk (OSWALT)   2015-11-03 09:42:00
attr有时候也很烦
作者: cywhale (cywhale)   2015-11-04 10:05:00
以前不知dplyr data.table都用aggregate...

Links booklink

Contact Us: admin [ a t ] ucptt.com