Updated version of completed R package code.