mirror of
				https://github.com/bspeice/betterwithdata_cleaning_4
				synced 2025-11-04 02:10:46 -05:00 
			
		
		
		
	replaced plot with summary table
This commit is contained in:
		@ -4,8 +4,10 @@ library(shiny)
 | 
			
		||||
shinyServer(function(input, output) {
 | 
			
		||||
  emergency2013 <- read.csv("./data/emergency2013.csv")
 | 
			
		||||
  
 | 
			
		||||
  output$distPlot <- renderPlot({
 | 
			
		||||
  output$mytable1 <- renderDataTable({
 | 
			
		||||
    library(ggplot2)
 | 
			
		||||
    emergency2013[, input$show_vars, drop = FALSE]
 | 
			
		||||
    
 | 
			
		||||
      
 | 
			
		||||
    plot(emergency2013$erdatemm, emergency2013$vstctgry)
 | 
			
		||||
  })
 | 
			
		||||
})
 | 
			
		||||
@ -13,9 +13,11 @@ shinyUI(fluidPage(
 | 
			
		||||
                         names(emergency2013), selected = names(emergency2013))
 | 
			
		||||
    ),
 | 
			
		||||
    
 | 
			
		||||
    # Show a plot of the generated distribution
 | 
			
		||||
    # Show a summary table of the selected variables
 | 
			
		||||
    mainPanel(
 | 
			
		||||
      plotOutput("distPlot")
 | 
			
		||||
      tabsetPanel(
 | 
			
		||||
        id = 'dataset',
 | 
			
		||||
        tabPanel('emergency2013', dataTableOutput('mytable1')))
 | 
			
		||||
    )
 | 
			
		||||
  )
 | 
			
		||||
))
 | 
			
		||||
		Reference in New Issue
	
	Block a user