Outlier implimentation in ShinyApp

15 views
Skip to first unread message

vhe...@analytos.com

unread,
Jun 16, 2016, 7:46:14 AM6/16/16
to ShinyApps Users
Hi ,


We are trying to impliment outliers in shinyApp.

The application works as expected if we hard code the values. 
## This code works.
test %>%
  group_by(iris_type1)%>%   
  ggplot(., aes(x = Species,y = Sepal.Width)) +
  geom_boxplot() +
  geom_text(aes(label = outlier), na.rm = TRUE, hjust = -0.3) 


When we tried to run the function by sending parameters its throwing an error 
Code:
     ## This code does not work
      test %>%
        group_by(datasetInput()[,input$BPColor])%>%   
        ggplot(., aes(x = datasetInput()[,input$BPColor],y = datasetInput()[,input$BPyvalgg])) +
        geom_boxplot() +
        geom_text(aes(label = outlier), na.rm = TRUE, hjust = -0.3) 

Error :incompatible size (150), expecting 50 (the group size) or 1

Please let me know where are we going wrong?

Attaching the complete code and sample data. Please try Species and sepal.length(or an other combination) to generate the error.

Thanks in advance

Vinuta Hegde
app_outliers_shiny.R
iris_new1.csv

Joshua Spiewak

unread,
Jun 16, 2016, 10:24:55 AM6/16/16
to ShinyApps Users
Does this work locally for you and not on shinyapps.io?
If it does not work locally, then you are having an issue with Shiny, and should follow up on the shiny-...@googlegroups.com list.
Reply all
Reply to author
Forward
0 new messages