💡Introduction

This R project analyzes hospital performance across the U.S.

based on 30-day mortality rates for serious conditions.

It includes 3 main functions:

🩺 Supported Outcomes

📊 Functions

best(state, outcome)

Returns the hospital with the lowest 30-day mortality rate

in the given state for a specific outcome.

 best("TX", "heart attack")
[1] "CYPRESS FAIRBANKS MEDICAL CENTER"

rankhospital(state, outcome, num = "best")

Returns the hospital of the given rank (e.g. "best", "worst", or a specific numeric rank) for the selected state and outcome.

rankhospital("TX", "heart failure", 4)
[1] "DETAR HOSPITAL NAVARRO"

rankall(outcome, num = "best")