I am trying to create a model with the glmnet package, but I get the following error when I run the following line:
#library('glmnet') x = model.matrix(response ~ ., data = acgh_frame[,c(3:ncol(acgh_frame))]) Error: protect(): protection stack overflow
I know this is due to my many variables (26k +) in the dataframe. When I use fewer variables, the error is not displayed. I know how to solve this on the R command line, but I need to stay in R studio, so I want to fix it from R Studio. So how do I do this?
stack-overflow r rstudio glmnet
Ansjovis86
source share