Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 dplyr 的 summarise_ 函数并对 ~.
例如,
summarise_(school, .dots = list(~ mean(PE), ~ mean(Math), ~n()))
给我2个变量的平均值和观察次数的结果。但是为什么要在每个函数前面使用~呢?使用summary函数时我不需要它,所以想知道它是干什么用的!