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