I'm a new user for R studio and I hope you can support me with this issue.
I would liket to us cv.glmnet function but first it always give me error message.
Here code that I wrote:
sample<-sample.split(LA10061,SplitRatio = 0.7)
First error message was:
Error in storage.mode(y) <- "double" :
'list' object cannot be coerced to type 'double'
after some research I realize i need to convert in matrix my data but then I get this error message:
Error in elnet(x, is.sparse, ix, jx, y, weights, offset, type.gaussian,
and I realize the solution is use function model.matrix but then I get this error message:
*tmp*, i, value = c(36L, 32L, 145L, 64L,
I'm a bit lost about how to solve this issue.