I extracted the coefficients from my glmnet model with code:
best_lambda_fit_coef <- coef(best_lambda_fit)
I got a list of coefficients that are in dgCMatrix, but I'm not sure how to make it a data frame. I looked the answer from Mehrad in Extracting coefficient variable names from glmnet into a data.frame, but it doesn't work for my situation. Below is the screenshot of the extracted dgCMatrix. Please advise. Thank you.