I want to create a function, that computes reliability estimates groupy by a factor variable. Therefore I wrote this not working function:
notworkingfunction <- function(dat, grvar){
reldat <- dat%>%
group_by_(grvar)%>%
do_(data.frame(alpha = MBESS::ci.reliability(data.frame(dplyr::select_(., quote(-grvar))))))
return(reldat)
}
notworkingfunction(iris, "Species")
It seems to me, that the NSE of select_() causes the problems. Every hints are welcome!