This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to fix this error, please help.

Hi, I believe here is better than ChatGPT. Please help me out with this error. Thank you very much. Best,

> library(Matrix)
> library(glmnet)
> set.seed(50)
> M1_1<-cv.glmnet(as.matrix(data[,-1]),data[,1] ,family = 'binomial',alpha = 1,nfolds = 
+                   10,type.measure = 'class')

Error in glmnet(x, y, weights = weights, offset = offset, lambda = lambda,  : 
  x has missing values; consider using makeX() to impute them
> 
lasso

The error tells you what's wrong and how to fix it. I'm tempted to mark this as spam.

0 answers

No answers yet.

Log in to answer this question.