Update functions.R

Added a couple useful libraries.