my question is besides defining a function outside sumise_each with multiple arguments, is there any other way to add an argument directly to summaryise_each?
For example, I want to get the average without NAs.this working
mean_fun=function(x)mean(x,na.rm=TRUE) AA_group=AA_new %>% group_by(tractID) AA_group %>% summarise_each(funs(mean_fun))
I am wondering if there is a way to add na.rm=TRUE directly to summarise_each , like the more_args option?
and also if I put mean_fun directly on summaryise, namely
AA_group %>% summarise_each(funs(function(x)mean(x,na.rm=TRUE)))
and mistake
expecting a single value
Does this mean that every time we want to use summaryise_each, we have to define a function outside of this?
source share