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
Add support for integer64 variable types #2377
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Slightly more minimal reprex: library(ggplot2)
df <- data.frame(x = bit64::as.integer64(1:10))
ggplot(df) + geom_histogram(aes(x))
#> Don't know how to automatically pick scale for object of type integer64. Defaulting to continuous.
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
#> Warning: Removed 10 rows containing non-finite values (stat_bin). Created on 2019-06-18 by the reprex package (v0.2.1.9000) Fixing this will probably happen naturally when we start using vctrs in ggplot2. |
Getting ggplot2 to know that the scale for integer64 objects should be continuous is a quick fix: scale_type.integer64 <- function(x) "continuous" However the current holdup is that scale expansion uses Line 176 in 7f317d4
Line 194 in 7f317d4
...with an improved (probably |
A reprex for future consideration: library(ggplot2)
scale_type.integer64 <- function(x) "continuous"
df <- data.frame(x = bit64::as.integer64(1:10))
ggplot(df) + geom_histogram(aes(x))
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
#> Warning: Computation failed in `stat_bin()`:
#> `binwidth` must be positive |
edgararuiz-zz commentedDec 21, 2017
•
edited by hadley
Results collected from databases can, including aggregations, could return an
integer64
variable type which does not seem to be supported byaes()
. The workaround is to coerceas.numeric()
prior to plotting.Code that collects the data:
The plot that is attempted followed by the error's text:
Don't know how to automatically pick scale for object of type integer64. Defaulting to continuous.
The text was updated successfully, but these errors were encountered: