Skip to content

Commit

Permalink
ggcall: deal with :: in data call
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Apr 16, 2021
1 parent b1ba603 commit 9bb3257
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/ggcall.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ ggcall <- function(data = NULL,
ylim = NULL) {
if (is.null(data))
return(expr(ggplot()))
data <- sym(data)
data <- as.character(data)
if (grepl("::", data)) {
data <- str2lang(data)
} else {
data <- sym(data)
}
if (rlang::is_call(mapping))
mapping <- eval(mapping)
mapping <- dropNulls(mapping)
Expand Down

0 comments on commit 9bb3257

Please sign in to comment.