### Read in the Pollution Dataset. Pollute <- read.table("Pollute.txt",header=T) ### Can we read the variables, like the "area" one? ### area ### NO, not until the dataframe is attached. attach(Pollute) area ### Two essential commands, "source" and "sink". ### source lets you read in from a file of commands ### sink lets you save the output to a file. ### Examples: source("myhomework.ssc") ### Examples: sink("myhomework.out") ### When you have finished writing your output, type in "sink()" ### and output will return to the screen. ### Graphics output commands (postscript under Unix, more choices ### under Windows). ### Here are the options that I use. ps.options(fonts=c("Courier")) ps.options(pointsize=12) ps.options(width=9,height = 6.5) ps.options(horizontal = T) ps.options(colors=ps.colors.rgb[ c("black","red", "blue","green", "yellow","white"),],background=ps.colors.rgb[c("black"),]) ### This is the command that will make your graphics output ### go to a particular file. postscript(file="myfig.ps") ### Do your graphics stuff here plot(pre82price,post82price) ### This one kills the graphics device dev.off() ### Don't forget to quit q() ### Commands from the deep. ### printer() and show()