我有一个将数据连接在一起的函数,然后应该取一列的平均值。 在这里,我可以连接数据,但我不确定如何以足够通用的方式对x.x和x.y列进行平均 library(dplyr)
b <- tibble(id = 1:3, x = 16:18)
full_join(df1, df2, by = "id") # i want to average x.x, and x.y
join_then_a
我正在使用dplyr并尝试进行整洁的评估。我对如何检查以确保有人为NSE放入了一个空对象而不是一个字符串感到困惑。例如,我想对非缺失数据进行过滤:#> #> The following objects are masked from 'package:stats':#> filter, lag
#> The following objects are masked from 'package:base'