Update functions.R

Uses lambda that minimizes CV error