I get an error
"Error in if (any(outlier)) { : missing value where TRUE/FALSE needed" when I try to use the rosnerTest, from the package EnvStats.
out1 <- aggregate(x = df$Price, by = list(df$Item), FUN = rosnerTest)
I'm trying to use the aggregate function in place of using for loop to do the rosner test because my data has over 14 million records with about 3 million unique items.
答案 0 :(得分:0)
Try saveEventually
instead:
tapply
答案 1 :(得分:0)
这是很久以前的事了,但也许它仍然对某人有帮助:
我遇到了同样的错误,因为我在某些行中没有异常值(例如,所有值都相同)。
在 for 循环中,您可以使用 try()
函数忽略这些错误,循环将继续下一行。