Re: [R] Basic population dynamics

2009-09-01 Thread Moshe Olshansky
Assuming that at the end all of them are dead, you can do the following: sum(deaths)-cumsum(deaths) Regards, Moshe. --- On Wed, 2/9/09, Frostygoat wrote: > From: Frostygoat > Subject: [R] Basic population dynamics > To: r-help@r-project.org > Received: Wednesday, 2 September, 2

Re: [R] Basic population dynamics

2009-09-01 Thread Henrique Dallazuanna
Try ths: Alive <- sum(deaths) - cumsum(deaths) On Tue, Sep 1, 2009 at 3:48 PM, Frostygoat wrote: > > Hello, > > For insect mortality data I'm trying to get an R script that will take > the data from the raw form and convert it to Lx (% survival) for a > number of treatments. The raw data has

[R] Basic population dynamics

2009-09-01 Thread Frostygoat
Hello, For insect mortality data I'm trying to get an R script that will take the data from the raw form and convert it to Lx (% survival) for a number of treatments. The raw data has the number of days lived for each individual for the respective treatment. Thus, for example, when R selects th