Hi

I agree with Dieter. I think you are probably looking for some 
aggregation function (aggregate, tapply, by,...), but it is only a 
guess. 

Sometimes it help me to answer my questions myself before I actually 
post it to Rhelp when I try to elaborate an example using artificial 
simple data for others to understand what I am trying to do and how I 
fail.

HTH
Petr


On 27 Apr 2006 at 6:20, Dieter Menne wrote:

To:                     r-help@stat.math.ethz.ch
From:                   Dieter Menne <[EMAIL PROTECTED]>
Date sent:              Thu, 27 Apr 2006 06:20:44 +0000 (UTC)
Subject:                Re: [R] help

> Anamika Chaudhuri <canamika16 <at> yahoo.com> writes:
> 
> >   I was trying to calculate an age adjusted rate for which we have
> >   the 
> formula as 
> >   sum(weight*rate)/sum(weight). I am using the framingham dataset
> >   called fram 
> here.I cant figure out how I
> > could change the logical statement I have for the standard dataset
> > (in red) 
> to calculate weight and
> > calculating the wevents and atrisk(in red)
> 
> ... lengthy code follows
> 
> If you want to get an answer, provide as good subject line and a data
> set (e.g. part of Framingham). Nobody loves to wade through so many
> lines of code without the chance to check out what is intended.
> 
> Dieter
> 
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
[EMAIL PROTECTED]

______________________________________________
R-help@stat.math.ethz.ch 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