# reading a csv file from the Internet powerball = read.csv("http://www1.lasalle.edu/~blum/c152wks/Powerball.csv") # view the data head(powerball) # rename the data field names names(powerball)=c("day","tickets_millions") # view the data again head(powerball) # make a bar plot # choosing color from at http://www.stat.columbia.edu/~tzheng/files/Rcolor.pdf barplot(powerball$tickets_millions, main="Powerball sales by day", ylim=c(0,1200), names.arg=powerball$day, cex.names=0.9, col=c("firebrick2","darkorange2","goldenrod2", "olivedrab3", "mediumaquamarine", "dodgerblue3", "darkorchid3"), las=2)