Update functions.R

Save glm output when running cvModel