######################################################################################## # # Load Factor: passenger-miles as a proportion of available seat-miles in percent # Office of the Assistant Secretary for Research and Technology # U.S. Department of Transportation # http://www.transtats.bts.gov/ # ######################################################################################## american = read.table("american.txt",header=TRUE) delta = read.table("delta.txt",header=TRUE) united = read.table("united.txt",header=TRUE) year = 2003:2014 ind = seq(4,nrow(data),by=12) par(mfrow=c(1,1)) plot(american[,4],xlab="Month",ylab="Load factor",axes=FALSE,type="l", ylim=range(american[,4],delta[,4],united[,4])) axis(2);box();axis(1,at=ind,lab=year) title("International flights") lines(delta[,4],col=2) lines(united[,4],col=4) legend(100,70,legend=c("American","Delta","United"),col=c(1,2,4),lty=1,bty="n")