Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. output$overat <- renderPlot({
  2. filtered <-
  3. Medi_sum_small %>%
  4. filter(State == input$e1)
  5. ggplot(Medi_sum_small, aes(Hospital_Ownership)) +
  6. geom_density(aes(fill=factor(Hospital_overall_rating)), alpha=0.7) +
  7. labs(x="Ownership",
  8. fill="Overall rating") +
  9. scale_x_discrete(labels = function(x) str_wrap(x,width=0.3))
  10.  
  11. })
  12.  
  13. box(
  14. title = "Select State"
  15. ,width = 3
  16. ,solidHeader = TRUE
  17. ,status = "primary"
  18. ,selectInput(
  19. 'e1', 'State',
  20. c("All",unique(Medi_sum_small$State))
  21. )
  22.  
  23. Graphs should be changed when I change the stage.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement