![a5d6624b61020372678b81cd3fa216fe.png](https://img-blog.csdnimg.cn/img_convert/a5d6624b61020372678b81cd3fa216fe.png)
个人R学习笔记 R笔记,不定时持续更新
用dplyr
编程
本部分主要是引用 Programming with dplyr:
https://cloud.r-project.org/web/packages/dplyr/vignettes/programming.html
原文概念性东西较多且复杂不易理解,先尝试会使用,概念再慢慢消化理解。
虽然复杂但是比较实用,尤其是当我们需要定义一些通用功能函数时
以下是对原文引用,建议直接阅读原文
两种情况:
- When you have the data-variable in a function argument (i.e. an env-variable that holds a promise2), you need to ** embrace ** the argument by surrounding it in doubled braces, like
filter(df, { { var }})
.
The following function uses embracing to create a wrapper around summarise()
that computes the minimum and maximum values of a variable, as well as the number of observations that were