# Author: Stuart Robinson # Date: 18 Jan 2006 # Description: This code will look for a file using a relative # path and use the data in it to create a line # graph of the Dow Jones Industrial Average # from 1985 to 2005. d <- read.table("data/djia-1985-2005.csv", header=TRUE) # read data jpeg("/tmp/test.jpg") # file for graph plot(d$year, d$start, type="l", # year as x, DJIA as y xlab="Year", ylab="DJIA", # label axes main="Dow Jones Industrial Average") # add title dev.off() # close file q() # quit