Skip to content

Commit

Permalink
bug filter data with namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Apr 19, 2021
1 parent 9bb3257 commit 7c01cc5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: esquisse
Type: Package
Title: Explore and Visualize Your Data Interactively
Version: 1.0.0.9010
Version: 1.0.0.9100
Authors@R: c(person("Fanny", "Meyer", role = c("aut")),
person("Victor", "Perrier", email = "victor.perrier@dreamrs.fr", role = c("aut", "cre")),
person("Ian", "Carroll", comment = "Faceting support", role = "ctb"),
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ importFrom(datamods,filter_data_ui)
importFrom(datamods,import_modal)
importFrom(datamods,import_server)
importFrom(datamods,show_data)
importFrom(ggplot2,"%+%")
importFrom(ggplot2,aes)
importFrom(ggplot2,coord_flip)
importFrom(ggplot2,facet_wrap)
Expand Down
9 changes: 5 additions & 4 deletions R/esquisse-server.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
#'
#' @importFrom shiny moduleServer reactiveValues observeEvent is.reactive
#' renderPlot stopApp plotOutput showNotification isolate reactiveValuesToList
#' @importFrom ggplot2 ggplot_build ggsave
#' @importFrom ggplot2 ggplot_build ggsave %+%
#' @import ggplot2
#' @importFrom datamods import_modal import_server show_data
#' @importFrom rlang expr sym
esquisse_server <- function(id,
data_rv = NULL,
default_aes = c("fill", "color", "size", "group", "facet"),
Expand Down Expand Up @@ -331,10 +332,10 @@ esquisse_server <- function(id,

ggplotCall$code <- deparse2(gg_call)
ggplotCall$call <- gg_call

ggplotCall$ggobj <- safe_ggplot(
expr = gg_call,
data = setNames(list(data), data_name)
expr = expr((!!gg_call) %+% !!sym("esquisse_data")),
data = setNames(list(data), "esquisse_data")
)
ggplotCall$ggobj$plot
}, filename = "esquisse-plot")
Expand Down

0 comments on commit 7c01cc5

Please sign in to comment.