Closed mmp3 closed 3 years ago
Hi @mmp3, thanks for the issue report.
This error is introduce in a recent PR #103. We originally were using require()
which gives a warning if the library is not installed. @DillonHammill suggested changing to requireNamespace()
, because that fixes some R CMD CHECK
warnings, but it functions differently: if the library does not exist, then it gives an error.
Dillon, do you have any thoughts? If require()
was the wrong function, then what should we use here? Based on this thread, I was thinking to change it to:
"rsvd" %in% rownames(installed.packages())
@linqiaozhi, there are a couple of options here:
rsvd
and irlba
offer significant speed improvements to PCA computation compared to prcomp/princomp
in the stats package. If prcomp/princomp
produces the same result (I am not sure about this), you could check to see if either rsvd
or irlba
is installed and if not, you could resort to using prcomp/princomp
from the stats package. All R users will have this package so the code will run without error every time.rsvd
or irlba
packages so that the if/else statements proceed as expected. I have implemented this in PR #112 which now returns a more meaningful error message when either of these packages has not been installed. Doing things this way means that you can stick to using requireNamespace()
.Fixed by @DillonHammill in #113. Thanks so much!
The
R
wrapper is missing somerequire
statements.The following minimal reproducible example results in an error:
output:
The error goes away after installing package
rsvd
from CRAN and then callinglibrary('rsvd')
before callingfftRtsne