Update functions.R

as.matrix(coef[,-1]) --->  coef[,-1, drop=FALSE]