Displaying 1 result from an estimated 1 matches for "range_group".
Did you mean:
age_group
2009 Aug 05
1
Question with apply function
In my continuing quest to generate some summary data, I've come across
some useful suggestions in pasts posts.
The apply operation returns an error, and I can't figure out why.
Can someone help me fix this?
testlogdata <- cbind(testlogdata, range_group=cut(testlogdata$lrm_score,
breaks=c(.9, .8, .7, .6, .5, .4, .3, .2, .1)))
apply(testlogdata, 2, function(x){tapply(x,
list(testlogdata$range_group), mean)})
From my understanding, this should generate a nice table with rows for
each "break" and a mean of each column for that break....