[R] what fun I need to put in this "tapply"
Weiwei Shi
helprhelp at gmail.com
Mon May 14 20:04:51 CEST 2007
Hi,
I happened to need generate the following
> t1
V1 V2 count count2
1 1 11 2 3
2 1 12 2 2
3 2 11 1 3
4 3 13 3 1
5 3 11 3 3
6 3 12 3 2
from
V1 V2
1 1 11
2 1 12
3 2 11
4 3 13
5 3 11
6 3 12
I am wondering what function of funx I need to put into
tapply(t1[,2], t1[,2] funx)
to get that?
If I use length, I probabaly need to do merge by myself. Is there a better way?
thanks.
--
Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.
"Did you always know?"
"No, I did not. But I believed..."
---Matrix III
More information about the R-help
mailing list