Hi,
I'm trying to use the model.matrix function. However, when I do this I receive the following error:
Error: protect(): protection stack overflow model matrix
I've tried to increase my memory.limit()
and increase the max pp size with: C:\Program Files\RStudio\bin>rstudio.exe --max-ppsize=5000000, but this does not solve the error. I've also tried to make my dataset smaller but I'm afraid that making it too small by decreasing the amount of variables that can be used will have a negative impact on the problem I'm trying to solve.
Would it be possible to just cut my dataset in smaller bits and perform the model.matrix
function on each part and then put the parts back together? Or does this drastically change the outcome of the function on my dataset?
You do not show any code or data, it's not possible to help here.