Update functions.R

Fixed a few things with the GLMnet case (removed NA's in the rows, added printing of progress)