I am currently running an example in the glmnet
documentation (https://cran.r-project.org/web/packages/glmnet/glmnet.pdf page 3):
> x=matrix(rnorm(100*20),100,20)
> y=rnorm(100)
> fit1=glmnet(x,y)
> plot(fit1,xvar="lambda")
However, I get this error message
Error in as.vector((beta %*% ones) > 0) : no method for coercing this S4 class to a vector
and I need help to understand why the error occurs.