I’d like to be able to send in a column name to a call that I am making to ddply. An example ddply call:
ddply(myData, .(MyGrouping), summarise, count=sum(myColumnName))
If I have ddply wrapped within another function is it possible to wrap this so that I can pass in an arbitrary value as myColumnName to the calling function?
There has got to be a better way. And I couldn’t figure out how to make it work with summarise.