-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in rowVars(p) : could not find function "rowVars" #14
Comments
rowVars is a function from matrixStats package, which should be automatically loaded into R. Maybe your R version is old. Please update to the latest one. |
I am running R 4.0.3 and using Bioconductor devel 3.12. I also use matrixStats for its row statistics functions and can confirm it does not automatically load. See below reprex:
Matrix products: default locale: attached base packages: loaded via a namespace (and not attached): The function works after DSS is loaded; presumably rowVars using namespace MatrixGenerics is used.
|===============================================================================================================| 100% |
Yeah you are right. I have library(matrixStats) in my .Rprofile. My bad. I'll update the package to use matrixStats::rowVars. I never used MatrixGenerics, seems like a new package. And I don't even have it installed in my R. I guess some other packages load matrixStats. BTW, is there particular reason why you don't want to load DSS? |
Thanks Haowu. I am developing a package and it's just my habit of loading as few packages as possible so I know their namespace dependencies when I finalise the functions. Your package imports bsseq, which imports DelayedMatrixStats, which depends MatrixGenerics and imports matrixStats. bsseq also imports a whole bunch of other packages, which I try to avoid as it helps in debugging which package is breaking the code. |
I've modified the package and committed the changes. Do you want a copy of the package? It'll take some time until the changes appear on bioc. Or you can just modify that yourself. |
Thanks. I have installed using devtools::install_github. Can now confirm the above example now works without loading library |
I am getting the following error:
dmlt = DSS::DMLtest(bs, group1, group2, equal.disp = FALSE, smoothing = FALSE, BPPARAM = BiocParallel::SnowParam(2))
Estimating dispersion for each CpG site, this will take a while ...
Error in rowVars(p) : could not find function "rowVars"
This error means I cannot use DMLtest without loading library(DSS) (which itself loads many other downstream packages). Perhaps specify the namespace e.g. calling MatrixGenerics::rowVars(p) ?
The text was updated successfully, but these errors were encountered: