【发布时间】:2016-12-30 13:28:03
【问题描述】:
我很好奇 dplyr 中的函数 n 是如何编程的。在 dplyr 环境中评估 n 时,我得到的只是:
function ()
{
stop("This function should not be called directly")
}
<environment: namespace:dplyr>
也许这是一个愚蠢的问题,但是,它是在哪里定义的?在其他一些函数中调用它是如何工作的?它隐藏在哪个环境中?
感谢您的帮助
【问题讨论】:
-
好问题。 The actual n() function 很容易找到,但它不能解释为什么
n()在mutate、filter和summarise中有效。可以在 C 代码中吗? -
可能是this帮助