x <- read.delim("http://minato.sip21c.org/beef-and-corpus-uteri-carcinoma.txt") # png("./beef-and-corpus-uteri-carcinoma.png", width=800, height=800) par(las=1) layout(matrix(1:4, 2)) y <- barplot(x$BEEFCC, col="red", ylim=c(0, 14), main="Crude beef consumption and corpus uteri carcinoma incidence") lines(y, x$CUCI/600, col="skyblue", lwd=2) axis(4, 0:8*5/3, labels=0:8*1000) axis(1, y, labels=x$YEAR) y <- barplot(x$BEEFSP, col="red", ylim=c(0, 14), main="Beef supply and corpus uteri carcinoma incidence") lines(y, x$CUCI/600, col="skyblue", lwd=2) axis(4, 0:8*5/3, labels=0:8*1000) axis(1, y, labels=x$YEAR) plot(CUCI ~ BEEFCC, data=x, type="p", pch=16, main="Crude beef consumption and corpus uteri carcinoma incidence") arrows(x$BEEFCC, x$CUCI, c(x$BEEFCC[-1], NA), c(x$CUCI[-1], NA), col="navy", length=0.1) plot(CUCI ~ BEEFSP, data=x, type="p", pch=16, main="Beef supply and corpus uteri carcinoma incidence") arrows(x$BEEFSP, x$CUCI, c(x$BEEFSP[-1], NA), c(x$CUCI[-1], NA), col="navy", length=0.1) # dev.off()