The RSM method is a wrapper around lm
in the R base package. One of the implicit necessities of the lm
method is that the matrix to which it is applied must be invertible. This translates into a situation where highly correlated data (correlation values considerably greater than 0 and approaching 1) can cause potholes in your matrix making it locally not invertible....then you get this error.
It does not matter how you structure the data (dataframe, matrix, list of lists) when you pass it into the method, it will throw the error because the values in the data destabilize the matrix and make using that method impossible in the current state.
The best solution would be to use a correlation matrix to figure out if you can pare out some of the highly correlated variables to make the matrix invertible.
Even if you were able to get the model to run as is, you would end up with stability issues in the results which would compromise the safe utility of the model.