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

failure in basic ggpairs example with GGally 2.20/ggplot2 3.4.4.9000/r-devel #481

Closed
bbolker opened this issue Dec 25, 2023 · 0 comments · Fixed by #483
Closed

failure in basic ggpairs example with GGally 2.20/ggplot2 3.4.4.9000/r-devel #481

bbolker opened this issue Dec 25, 2023 · 0 comments · Fixed by #483

Comments

@bbolker
Copy link
Contributor

bbolker commented Dec 25, 2023

I'm guessing there is some incompatibility here that may be resolved with a version update, but haven't dug in yet ...

I suspect this has to do with all the changes in the development version of ggplot2, e.g. here, but ... ??? (don't see anything in the R NEWS file that would suggest that this is an r-devel issue ...)

packageVersion("GGally"); packageVersion("ggplot2")
## [1] ‘2.2.0’
## [1] ‘3.4.4.9000’
data(flea)
ggpairs(flea, columns = 2:4)

Error in as.character(call[[1]]) :
cannot coerce type 'closure' to vector of type 'character'

traceback()
11: startsWith(as.character(call[[1]]), "scale_")
10: scale_y_continuous()
9: (function (data, mapping, ..., rescale = FALSE) 
   {
       mapping <- mapping_color_to_fill(mapping)
       p <- ggplot(data, mapping) + scale_y_continuous()
       if (identical(rescale, TRUE)) {
           p <- p + stat_density(aes(y = after_stat(!!as.name("scaled")) * 
               diff(range(x, na.rm = TRUE)) + min(x, na.rm = TRUE)), 
               position = "identity", geom = "line", ...)
       }
       else {
           p <- p + geom_density(...)
       }
       p
   })(data = structure(list(species = structure(c(1L, 1L, 1L, 1L, 
   
{redacted}

   2L, 2L, 2L, 2L, 2L, 2L), levels = c("Concinna", "Heikert.", "Heptapot."
   ), class = "factor"), tars1 = c(191L, 

{redacted}

       74L, 86L, 92L, 78L, 66L, 55L, 84L, 86L, 68L, 86L, 89L, 88L
       )), class = "data.frame", row.names = c(NA, -74L)), mapping = structure(list(
       x = ~tars1), class = "uneval"))
8: do.call(original_fn, allParams)
7: fn(pm$data, plotObj$mapping)
6: getPlot(pm, i, j)
5: `[.ggmatrix`(pm, i, j)
4: pm[i, j]
3: ggmatrix_gtable(x, ...)
2: print.ggmatrix(x)
1: (function (x, ...) 
   UseMethod("print"))(x)
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

Successfully merging a pull request may close this issue.

1 participant