-
Notifications
You must be signed in to change notification settings - Fork 979
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
Unnecessary warning from gmean about sum greater than integer can hold #986
Comments
data.table(a=c(1L,1L), v=c(2e9L, 2e9L))[, mean(v), a]
# a V1
# <int> <num>
#1: 1 2e+09
#Warning message:
#In gmean(v) :
# The sum of an integer column for a group was more than type 'integer' can hold so the result has #been coerced to 'numeric' automatically for convenience. @mattdowle is it fine to add extra argument to |
Or just suppress the warning altogether? The average of an integer vector isn't an integer anyway, so avoiding coercion is not a concern. |
@jangorecki yea it seems like this is the most expedient way in the current API. Problem is that is a registered routine from R so it needs a bit more effort. What would be easier is if we have access to a
I don't think that's possible though? So a new argument is the way to go... |
See at 3:01 into this video :
https://www.youtube.com/watch?v=AmE4LXPQErM
The text was updated successfully, but these errors were encountered: