ggforce icon indicating copy to clipboard operation
ggforce copied to clipboard

geom_autohistogram error with NA values

Open AndyPryke opened this issue 6 years ago • 0 comments

I get Error in if (any(negative)) { : missing value where TRUE/FALSE needed error with NA values, na.rm=TRUE and geom_autohistogram and/or geom_autodensity. Here is an example:

ds <- mpg
ds$displ[1] <- NA
ggplot(ds) +
    geom_bin2d(aes(x = .panel_x, y = .panel_y), na.rm=TRUE) +
    geom_autodensity(aes(x=.panel_x), na.rm=TRUE)+ 
    facet_matrix(vars(displ, cty, hwy), layer.lower = 1, layer.diag = 2, layer.upper=1)

Package ggforce version 0.3.1.9000 R version: R version 3.5.2 (2018-12-20) -- "Eggshell Igloo" (Microsoft R Open 3.5.2)

AndyPryke avatar Sep 25 '19 13:09 AndyPryke