This is a summary from hospital complications from https://data.medicare.gov/data/hospital-compare
compl %>%
filter(City=="LOUISVILLE" & `Compared to National`=="Worse than the National Rate") %>%
select(`Hospital Name`, `Measure Name`, `Compared to National`) %>%
datatable
compl %>%
filter(City=="LOUISVILLE" & `Compared to National`=="Better than the National Rate") %>%
select(`Hospital Name`, `Measure Name`, `Compared to National`) %>%
datatable
compl$`Compared to National` %>%
table %>%
prop.table
## .
## Not Available Better than the National Rate
## 0.0001833685 0.0136915131
## No different than the National Rate Not Available
## 0.5744628832 0.3220561719
## Number of Cases Too Small Worse than the National Rate
## 0.0663793894 0.0232266740
setwd("C:/Users/Pranay/Downloads")
hai<-read_csv('healthcareassociatedinfections.csv')
hai %>%
filter(City=="LOUISVILLE" & `Compared to National`=="Worse than the National Benchmark")%>% select(`Hospital Name`, `Measure Name`, `Compared to National`) %>%
datatable