Hi.

I have a big data set which could be represented something like this:

*plot     fate*
1         S
2         M
3         S
3         S
3         M
4         S
4         S
5         S
5         M
5         S
5         S
6         M
7         M

where plot is a location, and fate is either "survivorship" or "mortality"
( a plant lives or dies.) Thus in plot 5 there are 4 plants. 3 of them
survive, 1 dies.
I want to figure out a way to make R calculate the fraction of individuals
that survive in each plot for all of these. It is proving very challenging.

Example: Plot 5 would return a survivorship value of 3/4 or 75%/
                Plot 3 would return a survivorship value of 2/3 or 66%

Any help would be much appreciated.
Thank you

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to