0

I was using the glmnet package in R, and I saved my input x, as a csv file. Its dimensions are: 34 by 8.I saved the output variable y as another csv file, and its dimensions were: 34 by 1

Code: x <- read.csv("input.csv") y <- read.csv("output.csv")

  model = glmnet(x,y)

This shows the following error: Error in weighted.mean.default(y, weights) : 'x' and 'w' must have the same length

I even tried: as.numeric(unlist(y)), to make sure y is a vector, but it doesn't seem to work. Can someone please tell me the error in my format for the attributes?

204
  • 433
  • 1
  • 5
  • 19

0 Answers0