Tord,
Tord Snall wrote:
Dear all,
I try to summarise my data per category using aggregate, but for some
reason I get the error message "sum" not meaningful for factors even though
my vector is numeric. The data set is shown below.
Could someone please give a hint.
Thanks in advance!
Sincerely,
Tord
aggregate requires the first argument to be numeric if you're using sum
or mean. The way you had it, aggregate was trying to sum your
classification variable as well which is of class `factor'. Try the
following instead.
aggregate(list(tallstubbyta = test$tallstubbyta,
list(ObjektID = test$ObjektID), sum)
Regards,
Sundar
______________________________________________
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help