I would like to extract the glmnet generated model coefficients and create a SQL query from them. The function coef(cv.glmnet.fit) yields a \'dgCMa
coef(cv.glmnet.fit)
dgCMa
The names should be accessible as dimnames(coef(cv.glmnet.fit))[[1]], so the following should put both coefficient names and values into a data.frame: data.frame(coef.name = dimnames(coef(GLMNET))[[1]], coef.value = matrix(coef(GLMNET)))
dimnames(coef(cv.glmnet.fit))[[1]]
data.frame(coef.name = dimnames(coef(GLMNET))[[1]], coef.value = matrix(coef(GLMNET)))