【发布时间】:2019-10-10 18:00:15
【问题描述】:
我想对 tibble 的每一行进行泊松检验。但是, mutate 失败了,因为 poisson.test 似乎是为数字而不是列设计的。最好的解决方法是什么?目前,我唯一设法开始工作的是一个明确的 for 循环......
df <- tribble(
~count, ~time,
5, 10,
4, 7,
8, 10)
# Fails
df %>% mutate(rate = poisson.test(count, T = time)
# Error in poisson.test(remove_count, T = FHs) :
# the case k > 2 is unimplemented
【问题讨论】:
标签: r dplyr statistics