R-Programming - Assignment 3 - Part 1

April 18, 2015

Report Abuse
This is assignment 3 part 1 for "Introduction to R Programming" course
This experiment makes a simple histogram of mortality rate due to heart attack across various hospitals. This experiment implements a new function called best that take two arguments: the 2-character abbreviated name of a state and an outcome name. The function reads the outcome-of-care-measures.csv file and returns a character vector with the name of the hospital that has the best (i.e. lowest) 30-day mortality for the specified outcome in that state. The hospital name is the name provided in the Hospital.Name variable. The outcomes can be one of “heart attack”, “heart failure”, or “pneumonia”. Hospitals that do not have data on a particular outcome is excluded from the set of hospitals when finding the rankings. This is part of [Introduction to R programming course](https://www.coursera.org/course/rprog) The following figure shows the histogram of mortality rate for heart attack. ![](http://neerajkh.blob.core.windows.net/images/ass3part1_1.PNG) The experiment graph for this assignment is shown below. For this experiment, we uploaded dataset as zip file, created sample test input as part of enter module data, and finally wrote the function as a script in **Execute-R** module. ![](http://neerajkh.blob.core.windows.net/images/ass3part1_2.PNG) The following figure shows the hospital list with minimum mortality rate for specified outcome and region. ![](http://neerajkh.blob.core.windows.net/images/ass3part1_3.PNG)