# 2 beavers body temperature and activity #install.packages("MASS") library(MASS) data(beav1,beav2) day1<-which(beav1$day==346) # choosing to just plot one day's data day2<-which(beav2$day==307) xlim<-range(c(beav1$time[day1],beav2$time[day2])) ylim<-range(c(beav1$temp[day1],beav2$temp[day2])) plot(beav1$time[day1],beav1$temp[day1],xlim=xlim,ylim=ylim,col=beav1$activ[day1]+8,xlab="Time",ylab="Temperature") points(beav2$time[day2],beav2$temp[day2],col=beav2$activ[day2]+5)