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 in rollmean(): Parameter 'size' is too large. #2

Open
privefl opened this issue Nov 4, 2019 · 4 comments
Open

Error in rollmean(): Parameter 'size' is too large. #2

privefl opened this issue Nov 4, 2019 · 4 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@privefl
Copy link
Owner

privefl commented Nov 4, 2019

E.g. bigutilsr::rollmean(x = 1:3, size = 2).
It expects that (2 * size + 1) > length(x).

What strategy to adopt when it is not the case? (+ recode)

@privefl privefl changed the title Error in bigutilsr::rollmean(): Parameter 'size' is too large. Error in bigutilsr::rollmean(): Parameter 'size' is too large. Nov 4, 2019
@privefl privefl changed the title Error in bigutilsr::rollmean(): Parameter 'size' is too large. Error in rollmean(): Parameter 'size' is too large. Nov 4, 2019
@privefl privefl added bug Something isn't working question Further information is requested labels Jan 28, 2020
@shadrinams
Copy link

Any updates on the issue?

@privefl
Copy link
Owner Author

privefl commented Feb 2, 2021

I still don't know what would be the best way to handle this, and whether I should.
Indeed, if the size of the smoothing is too large, you'll get the mean for all values, which is not very useful anyway.

Any better suggestion?

@privefl privefl added help wanted Extra attention is needed and removed bug Something isn't working labels Feb 2, 2021
@alexey-larionov
Copy link

I came across this error when I tried bed_autoSVD() function with a very small number of variants (I know that normally several thousand of variants should be used; however, occasionally I have to analyse some awkward datasets).

To deal with this error I just explicitly suppress the smoothing log-p-values (as it doesn't make sense in this context) by setting roll.size=0.

On my opinion, it might be practically helpful, if you changed the default behaviour to something similar to what I described above. E.g. change Error to Warning, so the function completes, but warns the user that the smoothing had been suppressed.

@privefl
Copy link
Owner Author

privefl commented May 30, 2021

Yes, we could default back to 0, or to the largest allowed value, or just implement a version that works even if the size is too large.
I don't really have an opinion on which solution would be the best, this is why I haven't really done anything to solve this yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants