Displaying 1 result from an estimated 1 matches for "timeclass".
Did you mean:
someclass
2008 Apr 30
2
Summary statistics across factor levels
...g "cross" option. I would
like to produce similar output with N and Missing columns but produce
a data.frame. Is there any built-in function for that?
#example data
install.packages("Hmisc")
library(Hmisc)
sek <- seq(1, nrow(Indometh), 9)
Indometh$time[sek] <- NA
Indometh$timeclass <- factor(cut(Indometh$time, breaks=c(0,2,4,6,8,10)))
Indometh
with(Indometh, summary(conc ~ Subject + timeclass, method="cross"))
#similar with aggregate and reshape but no N or Missing count
i.mean <- aggregate(Indometh$conc, list(Indometh$Subject,
Indometh$timeclass), mean, na.r...