Temporal measurements of density of beetles (Tribolium confusum) growing in different controlled environments.
beetles
Number of days.
The quantities of flour (in grams) of the environments where the beetles were growing. Six levels of the factor Diet.
The various stage of beetles, i.e., eggs, larvae, pupae, and adults.
The number of insects per environment.
- Chapman RN. 1928. The quantitative analysis of environmental factors. Ecology 9(2):111-122. tools:::Rd_expr_doi("10.2307/1929348")
data(beetles)
table(beetles$type)
name.diet<-unique(beetles$diet)
num.diet<-length(name.diet)
##Time series plot
#first, some computation
alys<-with(beetles,tapply(density,list(as.factor(days),as.factor(diet)),sum))
out<-as.data.frame(alys)
out$time<-row.names(out)
head(out)
#Figure 1 of the paper
matplot(out[,"time"], out[,1:num.diet], las=1, type=c("b"),pch=1,
xlab="Time in days",ylab="Total individuals")
legend("topleft", legend = name.diet, title = "Diet (gr)",
col = 1:6, lty = 1:6, pch = 1)
Run the code above in your browser using DataLab