Using sort and rank in R on multiple columns
问题 I’m trying to rank my hospital name by lowest rate for each state. When multiple hospitals have the same rate, the tie should be broken by using the hospital name and sorting it alphabetically. So far I’ve managed to rank it by rate within the state sorting it by hospital name, but I can’t figure out how to break the ties and rank it without skipping numbers This is what I’ve got so far by using the following code: outcome_data <- read.csv("outcome-of-care-measures.csv", na.strings="Not