From c00134f8850665a8a821d5fec0b6fdb895ed8bde Mon Sep 17 00:00:00 2001 From: Stefan Eng Date: Tue, 11 Jul 2023 19:26:28 -0700 Subject: [PATCH] Fix inability to use do.call with create.scatterplot Switch match.call to sys.call --- R/create.scatterplot.R | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/R/create.scatterplot.R b/R/create.scatterplot.R index 7afe4cf..c68c4cf 100644 --- a/R/create.scatterplot.R +++ b/R/create.scatterplot.R @@ -200,12 +200,8 @@ create.lollipopplot <- create.scatterplot <- function( regions.alpha = 1, lollipop.bar.y = NULL, lollipop.bar.color = 'gray', ... ) { - function.name <- match.call()[[1]]; - - lollipop.plot <- FALSE; - if (function.name == 'create.lollipopplot') { - lollipop.plot <- TRUE; - } + function.call <- as.character(sys.calls()[[1]]); + lollipop.plot <- 'create.lollipopplot' %in% function.call; ### needed to copy in case using variable to define rectangles dimensions rectangle.info <- list(