Created
November 4, 2016 22:14
-
-
Save nharrell04/77c404f8d4f3d4cb3080c665d0432fbc 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
best <- function(state, outcome){ | |
outcome_data <-read.csv("outcome-of-care-measures.csv", colClasses = "character") | |
## | |
state_options <- outcome_data[,7] | |
if(state %in% state_options){} | |
else | |
{ | |
stop("invalid state") | |
} | |
if(outcome !="heart attack"){break} | |
else if(outcome == "heart failure"){break} | |
else if(outcome == "pneumonia"){break} | |
else | |
{ | |
stop("invalid outcome") | |
} | |
## | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment