dimRed
dimRed copied to clipboard
Sparse matrix error
I find it misleading trying to use embed()
on a sparse matrix and don't get an error. After an investigation, I see a call of as.matrix()
on my sparse matrix. I think it's reasonable to throw an error preventing a memory explosion. Even more, the call as.matrix()
assumes a user can pass something else and the result can be unexpected. It's dangerous and in some point of view, in most cases, useless.
That's the R philosophy :-), there is lots of code that does so. Also "dangerous" is a strong word, if you deal with medium size data in R you have to be aware of your memory footprint anyway.
Fun aside, thanks for reporting this, you are right and it makes sense to allow only matrices as input, still this is a code change that is breaking breaking and has to be considered carefully.
tidyverse
works with it using warnings()