R Script 1 for Homework #6.