woodpecker
x <- subset(woodpecker, rate == "adult")
plot(x$year, x$start,
type = "o", pch = 16,
ylab = "Number of adults", xlab = "Year",
main = "Acorn Woodpeckers in Water Canyon"
)
## stage-specific survival rate
x <- aggregate(
list(Nstart = woodpecker$start, Nsurv = woodpecker$surv),
list(stage = woodpecker$rate), sum
)
x$survival <- x[, 3] / x[, 2]
x
Run the code above in your browser using DataLab