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 when I use SAVER with size.factor =1 #33

Open
ScarletChieftain opened this issue Jan 19, 2022 · 3 comments
Open

Error when I use SAVER with size.factor =1 #33

ScarletChieftain opened this issue Jan 19, 2022 · 3 comments

Comments

@ScarletChieftain
Copy link

Hi,
I have a dataset with 22164 rows and 268 columns. When I run SAVER with size.factor = 1 since my dataset has been normalized, an Error appears. It said:

Error in optimize(calc.loglik.b, interval = c(0, var(y/sf)/mean(y/sf)), :
'xmin' not less than 'xmax'
In addition: Warning message:
In if (!(grepl("matrix", class(x), ignore.case = TRUE))) { :
the condition has length > 1 and only the first element will be used

And my device is M1 macbook, running R 4.1.0.
This error does not appear when I use default size.factor.

Thanks!

@ScarletChieftain
Copy link
Author

And I used as.matrix()

@mohuangx
Copy link
Owner

Hi there,
Can you try setting the size.factor = rep(1, ncol(x))?

@mohuangx
Copy link
Owner

Ah actually, never mind. There's a function that automatically does that.

Are there any negative numbers in your dataset?

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

2 participants