0
boxplot(as.formula(formulaText()),
        data = df,
        outline = input$outliers)

By selecting outline = true/false, outliers can be shown interactively in r shiny:

p<- ggplot(df, aes_string(x=input$variable1, y=input$variable)) +
  geom_boxplot() + coord_flip()
print(p)

Is there a flag or work around to achieve the same in the ggplot2 package?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
  • As a code question, this would be a better fit on SO - see our [help/on-topic] – Silverfish Sep 13 '16 at 08:54
  • You can use `geom_boxplot(outlier.shape = NA)` to avoid showing outliers, so you should be be able to use `input$outliers` to assign either a shape (like the default, 19) or `NA`. – aosmith Sep 13 '16 at 15:25
  • 1
    Possible duplicate of [Ignore outliers in ggplot2 boxplot](http://stackoverflow.com/questions/5677885/ignore-outliers-in-ggplot2-boxplot) – Axeman Sep 13 '16 at 21:17

0 Answers0