-
I've been reading more about mapping shiny inputs into ggplot2. I used to use: ggplot(data) + aes_string(x=input$x)
-
However,
aes_string()
is deprecated. The new pattern is: ggplot(data) + aes(x= .data[[input$x]]) (note its ".data", not "data") More info here: mastering-shiny.org/action-tidy.html -
I'll have to update gradual introduction to Shiny to use this instead of
aes_string()
. #RStats -
You can also use the
.data[[]]
pattern with dplyr statements: dataset %>% group_by(.data[[input$var]]) %>% summarize(...) -
This is really useful in reactives, when you're using dplyr statements to dynamically filter.