Displaying 1 result from an estimated 1 matches for "eeddf6db".
2010 Mar 15
2
aggregate without removing empty subset
Hi the list,
As it is say in its doc, the aggregate function remove empty subsets. Is
it possible to NOT remove empty subset ?
--- 8< -------
m <- matrix(1:12,4)
part <- factor(c("A","B","A","B"),levels=c("A","B","C"))
aggregate(m,list(part),mean)
### I get:
# Group.1 V1 V2 V3
# 1 A 2 6 10
# 2 B 3 7