help
Sent: Wednesday, October 31, 2012 8:30 AM
Subject: RE: [R] aggregate.formula: formula from string
Dear Arun,
Thanks for your suggestion, that does the trick. Just because I'm curious,
where does the problem come from? I figured that wrapping the formula object in
brackets wou
s the root
cause?
Thanks for your help!
KR,
-Thorn
> -Original Message-
> From: arun [mailto:smartpink...@yahoo.com]
> Sent: Mittwoch, 31. Oktober 2012 13:15
> To: Thaler,Thorn,LAUSANNE,Applied Mathematics
> Cc: R help
> Subject: Re: [R] aggregate.formula: formula fro
Hi,
Try this:
res<- aggregate(eval(mF),d,mean)
res
# a b NA NA
#1 1 A -1.48354978 -0.37141485
#2 2 A -0.08862713 0.35359250
#3 3 A 1.17519518 -0.47595290
#4 1 B 0.10214686 -0.70005131
#5 2 B 0.41185154 0.03707291
#6 3 B 0.20507062 -0.67946389
res1<-aggregate(cbind(y, z)
3 matches
Mail list logo