Update functions.R

getpenweights: univariate regression with intercept