-
-
Save tommyhuang1/15a16f8dea0ea32352b7b23a3f4db32b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ui.R | |
menuSubItem("Heart Disease and Stroke Indicators",tabName = "HeartDiseaseandStrokeIndicators",icon = icon("bar-chart")) | |
tabItem(tabName = "HeartDiseaseandStrokeIndicators", | |
h3("Heart Disease and Stroke Mortality"), | |
fluidRow(column(12,plotOutput("HeartDiseaseStrokeMortality"))), | |
br(), | |
h3("Heart Disease and Stroke Hospitalizations"), | |
fluidRow(column(12,plotOutput("HeartDiseaseStrokeHospitalizations")))) | |
#server.R | |
output$HeartDiseaseStrokeMortality<-renderPlot( | |
ggplot(HD1,aes(x=factor(Race_Ethnicity),y=Mortality)) + facet_wrap(~MortalityType) + | |
geom_bar(stat="identity",aes(fill = factor(Race_Ethnicity))) + guides(fill=guide_legend(title = "Race Ethnicity")) + | |
theme(strip.text = element_text(size=15)) + xlab('Race Ethnicity') + ylab('Mortality per 100,000 Population') + | |
theme(plot.title = element_text(size = 15, face = "bold")) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment