Skip to content
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 with the pca function #70

Open
Pierre9344 opened this issue Dec 14, 2023 · 3 comments
Open

Error with the pca function #70

Pierre9344 opened this issue Dec 14, 2023 · 3 comments

Comments

@Pierre9344
Copy link

Hello,

I get the error next when using the pca function:

> PCAtools::pca(rlog, coldata, removeVar = 0.1)
Erreur : useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE.

I got this after updating some packages. I guess this come from the matrixStats package (https://cran.rstudio.com/web/packages/matrixStats/news/news.html).

Can you correct this?

Thank you in advance for your help.

@elifozcelik
Copy link

Hi, I am having the same issue. My I ask what is the version you are using for matrixStats?

@lalodragon
Copy link

lalodragon commented Dec 21, 2023

@elifozcelik This appears to be defunct in matrixStats 1.2, but may also be universally defunct in R 4.4

I have the same issue. In trying to find a workaround, I discovered that DelayedArray is also complicating this somehow. If I edit the problem line here

vars <- colVars(DelayedArray(mat), center = .center)
to
vars <- colVars(DelayedArray(mat), center = .center, useNames = T)
I continue to get the same error. However, if I remove the DelayedArray wrapper
vars <- colVars(mat, center = .center, useNames = T)
This works.

I'm not familiar with DelayedArray enough to guess why this is happening. But in the meantime, removing it and adding the useNames specification does work.

@Pierre9344
Copy link
Author

Hello, I found a workaround that consist in installing the 1.1 version of the matrixStats package:

remotes::install_github("HenrikBengtsson/matrixStats", ref="1.1.0")

keep in mind that R will propose to update it when installing other package. The fact that we use a "deprecated" version may also cause problem with other packages (I didn't see any for now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants