Thanks to all of you.
That's what I want.

Best wishes,
Muhammad Subianto


Try

tapply(prevRND.dat$Z, list(X=prevRND.dat$X, Y=prevRND.dat$Y), mean)

__________________________________
Andy Jaworskitry:


try:

tapply( Z, list( X, Y ), mean )

----------------------
Bendix Carstensen
How about:


xtabs(Z ~ X + Y, data = prevRND.dat)


Y
X A B C A 0.950933 0.143600 0.956133
B 0.000533 0.986467 0.032066
C 0.005333 0.000000 0.009266


HTH,

Marc Schwartz

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to