Part of Homework 10 for Stat 547: Creating an R package.