Skip to content

Commit

Permalink
fix & and * operators
Browse files Browse the repository at this point in the history
  • Loading branch information
Polkas committed Nov 14, 2024
1 parent 6d4c9b0 commit 71f1812
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/patchwork.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#' @export
"*.ggcall" <- function(e1, e2) {
validate_patchwork()
plot <- utils::getFromNamespace("*.ggplot", "patchwork")(e1, e2)
plot <- utils::getFromNamespace("*.gg", "patchwork")(e1, e2)
if (inherits(e1, "ggcall") && inherits(e2, "ggcall")) {
attr(plot, "ggcall") <- bquote(.(ggcall(e1)) * .(ggcall(e2)))
attr(plot, "ggcall_env") <- merge_env(attr(e1, "ggcall_env"), attr(e2, "ggcall_env"))
Expand All @@ -50,7 +50,7 @@
#' @export
"&.ggcall" <- function(e1, e2) {
validate_patchwork()
plot <- utils::getFromNamespace("&.ggplot", "patchwork")(e1, e2)
plot <- utils::getFromNamespace("&.gg", "patchwork")(e1, e2)
if (inherits(e1, "ggcall") && inherits(e2, "ggcall")) {
attr(plot, "ggcall") <- bquote(.(ggcall(e1)) & .(ggcall(e2)))
attr(plot, "ggcall_env") <- merge_env(attr(e1, "ggcall_env"), attr(e2, "ggcall_env"))
Expand Down

0 comments on commit 71f1812

Please sign in to comment.