Programming Assignment 3: Hospital Quality

My code repository for coursera data science specialization by john hopkins university, assignment instructions.

The data for this assignment come from the Hospital Compare web site (http://hospitalcompare.hhs.gov) run by the U.S. Department of Health and Human Services. The purpose of the web site is to provide data and information about the quality of care at over 4,000 Medicare-certified hospitals in the U.S. This dataset es- sentially covers all major U.S. hospitals. This dataset is used for a variety of purposes, including determining whether hospitals should be fined for not providing high quality care to patients (see http://goo.gl/jAXFX for some background on this particular topic).

The Hospital Compare web site contains a lot of data and we will only look at a small subset for this assignment. The zip file for this assignment contains three files

  • outcome-of-care-measures.csv: Contains information about 30-day mortality and readmission rates for heart attacks, heart failure, and pneumonia for over 4,000 hospitals.
  • hospital-data.csv: Contains information about each hospital.
  • Hospital_Revised_Flatfiles.pdf: Descriptions of the variables in each file (i.e the code book).

A description of the variables in each of the files is in the included PDF file named Hospital_Revised_Flatfiles.pdf. This document contains information about many other files that are not included with this programming assignment. You will want to focus on the variables for Number 19 (“Outcome of Care Measures.csv”) and Number 11 (“Hospital Data.csv”). You may find it useful to print out this document (at least the pages for Tables 19 and 11) to have next to you while you work on this assignment. In particular, the numbers of the variables for each table indicate column indices in each table (i.e. “Hospital Name” is column 2 in the outcome-of-care-measures.csv file)

More information about the assignment here

Data zip file - link

1 Plot the 30-day mortality rates for heart attack - outcome.R

histogram for heart attack

2 Finding the best hospital in a state - best.R

Write a 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 should be excluded from the set of hospitals when deciding the rankings.

3 Ranking hospitals by outcome in a state - rankhospital.R

Write a function called rankhospital that takes three arguments: the 2-character abbreviated name of a state (state), an outcome (outcome), and the ranking of a hospital in that state for that outcome (num). The function reads the outcome-of-care-measures.csv file and returns a character vector with the name of the hospital that has the ranking specified by the num argument. For example, the call rankhospital(“MD”, “heart failure”, 5) would return a character vector containing the name of the hospital with the 5th lowest 30-day death rate for heart failure. The num argument can take values “best”, “worst”, or an integer indicating the ranking (smaller numbers are better). If the number given by num is larger than the number of hospitals in that state, then the function should return NA. Hospitals that do not have data on a particular outcome should be excluded from the set of hospitals when deciding the rankings.

4 Ranking hospitals in all states - rankall.R

Write a function called rankall that takes two arguments: an outcome name (outcome) and a hospital ranking (num). The function reads the outcome-of-care-measures.csv file and returns a 2-column data frame containing the hospital in each state that has the ranking specified in num. For example the function call rankall(“heart attack”, “best”) would return a data frame containing the names of the hospitals that are the best in their respective states for 30-day heart attack death rates. The function should return a value for every state (some may be NA). The first column in the data frame is named hospital, which contains the hospital name, and the second column is named state, which contains the 2-character abbreviation for the state name. Hospitals that do not have data on a particular outcome should be excluded from the set of hospitals when deciding the rankings.

Hospital Quality Project

Introduction.

Download the file ProgAssignment3-data.zip file containing the data for Programming Assignment 3 from the Coursera web site. Unzip the file in a directory that will serve as your working directory. When you start up R make sure to change your working directory to the directory where you unzipped the data.

The data for this assignment come from the Hospital Compare web site ( http://hospitalcompare.hhs.gov ) run by the U.S. Department of Health and Human Services. The purpose of the web site is to provide data and information about the quality of care at over 4,000 Medicare-certified hospitals in the U.S. This dataset essentially covers all major U.S. hospitals. This dataset is used for a variety of purposes, including determining whether hospitals should be fined for not providing high quality care to patients (see http://goo.gl/jAXFX for some background on this particular topic).

The Hospital Compare web site contains a lot of data and we will only look at a small subset for this assignment. The zip file for this assignment contains three files

  • outcome-of-care-measures.csv : Contains information about 30-day mortality and readmission rates for heart attacks, heart failure, and pneumonia for over 4,000 hospitals.
  • hospital-data.csv : Contains information about each hospital.
  • Hospital_Revised_Flatfiles.pdf : Descriptions of the variables in each file (i.e the code book).

A description of the variables in each of the files is in the included PDF file named Hospital_Revised_Flatfiles.pdf. This document contains information about many other files that are not included with this programming assignment. You will want to focus on the variables for Number 19 (“Outcome of Care Measures.csv”) and Number 11 (“Hospital Data.csv”). You may find it useful to print out this document (at least the pages for Tables 19 and 11) to have next to you while you work on this assignment. In particular, the numbers of the variables for each table indicate column indices in each table (i.e. “Hospital Name” is column 2 in the outcome-of-care-measures.csv file).

Downloading data

Set up directory for downloading data

Download and upzip data

1. Plot the 30-day mortality rates for heart attack

Read the outcome data into R via the read.csv function and get the number of dimensions.

Make a simple histogram of the 30-day death rates from heart attack

→ As can be seen from the plot, the majority death rates is 16.

2. Finding the best hospital in a state

In this part, we will write a function to discover a name of the hospital in the outcome-of-care-measures.csv file has the best (i.e. lowest) 30-day mortality for the specific 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 should be excluded from the set of hospitals when deciding the rankings.

Handling ties

If there is a tie for the best hospital for a given outcome, then the hospital names should be sorted in alphabetical order and the first hospital in the set should be chosen (i.e. if hospitals “b”, “c” and “f” are tied for the best, then hospital “b” should be returned).

Function summary

best(state, outcome)

  • state : the 2-character abbreviated name of a state
  • outcome : an outcome name

Return a hospital name in that sate with the lowest 30-day death rate

Function definitions

  • Util functions

check.validity(state, outcome) : Check the validity of state and outcome with the following conditions: state must be a 2-character abbreviated name of a state, outcome must be one of “heart attack”, “heart failure” or “pneumonia”

get.hospital(df, state, outcome) : filter the hospital in that state then sort them by 30-day death rate and name

  • Main function
  • Some illustrations

3. Ranking hospitals by outcome in a state

In this part, we will write a function called rankhospital , the function reads the outcome-of-care-measures.csv file and returns a character vector with the name of the hospital that has the specified ranking. Hospitals that do not have data on a particular outcome should be excluded from the set of hospitals when deciding the rankings.

It may occur multiple hospitals have the same 30-day mortality rate for a given cause of death. In those cases ties should be broken by using the hospital name.

rankhospital(state, outcome, name)

  • state : The 2-character abbreviated name of a state
  • outcome : An outcome name
  • num : The ranking of a hospital in that state for that outcome. This argument can take values “best”, “worst”, or an integer indicating the ranking (smaller numbers are better). If the given number is larger than the number of hospitals in that state, then the function should return NA.

Return hospital names in that state with the given rank 30-day death rate. For example, the call rankhospital("MD", "heart failure", 5) would return a character vector containing the name of the hospital with 5th lowest 30-day death rate for heart value.

Function definition

4. ranking hospitals in all states.

In this part, we will write a function called rankdall , the function reads the outcome-of-care-measures.csv file and returns a 2-column data frame containing the hospital in each state that has the given ranking.

The rankall function should handle ties in the 30-day mortality rates in the same way that the rankhospital function handles ties. The function should return a value for every state (some may be NA). The first column in the data frame is named hospital , which contains the hospital name, and the second column is named state , which contains the 2-character abbreviation for the state name. Hospitals that do not have data on a particular outcome should be excluded from the set of hospitals when deciding the rankings.

rankall(outcome, num = "best")

Return a data frame with the hospital names and the abbreviated state name. For example the function call rankall("heart attack", "best") would return a data frame containing the names of the hospitals that are the best in their respective states for 30-day heart attack death rates.

Here are the libraries and their versions that I am using in this project:

Instantly share code, notes, and snippets.

@sportebois

sportebois / best-tests.R

  • Download ZIP
  • Star ( 0 ) 0 You must be signed in to star a gist
  • Fork ( 0 ) 0 You must be signed in to fork a gist
  • Embed Embed this gist in your website.
  • Share Copy sharable link for this gist.
  • Clone via HTTPS Clone using the web URL.
  • Learn more about clone URLs
  • Save sportebois/9a1254faaed04dffdc20 to your computer and use it in GitHub Desktop.
library(testthat)
assert.best <- function () {
message("# Starting to test best(..)")
expect_equal(expected = "CYPRESS FAIRBANKS MEDICAL CENTER", object = best("TX", "heart attack"))
expect_equal(expected = "FORT DUNCAN MEDICAL CENTER", object = best("TX", "heart failure"))
expect_equal(expected = "JOHNS HOPKINS HOSPITAL, THE", object = best("MD", "heart attack"))
expect_equal(expected = "GREATER BALTIMORE MEDICAL CENTER", object = best("MD", "pneumonia"))
expect_error(object = best("BB", "heart attack"), regexp = "invalid state")
expect_error(object = best("NY", "hert attack"), regexp = "invalid outcome")
}
# Automatically run the tests
assert.best()
test.best <- function() {
# Manual run
best("TX", "heart attack")
#[1] "CYPRESS FAIRBANKS MEDICAL CENTER"
best("TX", "heart failure")
# [1] "FORT DUNCAN MEDICAL CENTER"
best("MD", "heart attack")
# "JOHNS HOPKINS HOSPITAL, THE"
best("MD", "pneumonia")
# "GREATER BALTIMORE MEDICAL CENTER"
best("BB", "heart attack")
# Error in best("BB", "heart attack") : invalid state
best("NY", "hert attack")
# Error in best("NY", "hert attack") : invalid outcome
}

The assertions do use the testthat package http://cran.r-project.org/web/packages/testthat/index.html

R Programming Assignment 3: Hospital Quality

Introduction.

Download the file ProgAssignment3-data.zip file containing the data for Programming Assignment 3 from the Coursera web site. Unzip the file in a directory that will serve as your working directory. When you start up R make sure to change your working directory to the directory where you unzipped the data.

The data for this assignment come from the Hospital Compare web site ( http://hospitalcompare.hhs.gov ) run by the U.S. Department of Health and Human Services. The purpose of the web site is to provide data and information about the quality of care at over 4,000 Medicare-certified hospitals in the U.S. This dataset essentially covers all major U.S. hospitals. This dataset is used for a variety of purposes, including determining whether hospitals should be fined for not providing high quality care to patients (see http://goo.gl/jAXFX for some background on this particular topic).

The Hospital Compare web site contains a lot of data and we will only look at a small subset for this assignment. The zip file for this assignment contains three files:

  • outcome-of-care-measures.csv : Contains information about 30-day mortality and readmission rates for heart attacks, heart failure, and pneumonia for over 4,000 hospitals.
  • hospital-data.csv : Contains information about each hospital.
  • Hospital_Revised_Flatfiles.pdf : Descriptions of the variables in each file (i.e the code book).

A description of the variables in each of the files is in the included PDF file named Hospital_Revised_Flatfiles.pdf . This document contains information about many other files that are not included with this programming assignment. You will want to focus on the variables for Number 19 (“Outcome of Care Measures.csv”) and Number 11 (“Hospital Data.csv”). You may find it useful to print out this document (at least the pages for Tables 19 and 11) to have next to you while you work on this assignment. In particular, the numbers of the variables for each table indicate column indices in each table (i.e. “Hospital Name” is column 2 in the outcome-of-care-measures.csv file).

Part 1: Plot the 30-day mortality rates for heart attack

Read the outcome data into R via the read.csv function and look at the first few rows.

("outcome-of-care-measures.csv", colClasses = "character")
> head(outcome)

There are many columns in this dataset. You can see how many by typing ncol(outcome) (you can see the number of rows with the nrow function). In addition, you can see the names of each column by typing names(outcome) (the names are also in the PDF document).

To make a simple histogram of the 30-day death rates from heart attack (column 11 in the outcome dataset), run

] <- as.numeric(outcome[, 11])
> ## You may get a warning about NAs being introduced; that is okay
> hist(outcome[, 11])

Because we originally read the data in as character (by specifying colClasses = “character” we need to coerce the column to be numeric. You may get a warning about NAs being introduced but that is okay.

There is nothing to submit for this part.

Part 2: Finding the best hospital in a state

Write a 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 should be excluded from the set of hospitals when deciding the rankings.

Handling ties. If there is a tie for the best hospital for a given outcome, then the hospital names should be sorted in alphabetical order and the first hospital in that set should be chosen (i.e. if hospitals “b”, “c”, and “f” are tied for best, then hospital “b” should be returned).

The function should use the following template.

(state, outcome) {
## Read outcome data

## Check that state and outcome are valid

## Return hospital name in that state with lowest 30-day death
## rate
}

The function should check the validity of its arguments. If an invalid state value is passed to best , the function should throw an error via the stop function with the exact message “invalid state”. If an invalid outcome value is passed to best , the function should throw an error via the stop function with the exact message “invalid outcome”.

Here is some sample output from the function.

("best.R")
> best("TX", "heart attack")
[1] "CYPRESS FAIRBANKS MEDICAL CENTER"
> best("TX", "heart failure")
[1] "FORT DUNCAN MEDICAL CENTER"
> best("MD", "heart attack")
[1] "JOHNS HOPKINS HOSPITAL, THE"
> best("MD", "pneumonia")
[1] "GREATER BALTIMORE MEDICAL CENTER"
> best("BB", "heart attack")
Error in best("BB", "heart attack") : invalid state
> best("NY", "hert attack")
Error in best("NY", "hert attack") : invalid outcome
>

Save your code for this function to a file named best.R .

Part 3: Ranking hospitals by outcome in a state

Write a function called rankhospital that takes three arguments: the 2-character abbreviated name of a state ( state ), an outcome ( outcome ), and the ranking of a hospital in that state for that outcome ( num ). The function reads the outcome-of-care-measures.csv file and returns a character vector with the name of the hospital that has the ranking specified by the num argument. For example, the call

("MD", "heart failure", 5)

would return a character vector containing the name of the hospital with the 5th lowest 30-day death rate for heart failure. The num argument can take values “best”, “worst”, or an integer indicating the ranking (smaller numbers are better). If the number given by num is larger than the number of hospitals in that state, then the function should return NA . Hospitals that do not have data on a particular outcome should be excluded from the set of hospitals when deciding the rankings.

Handling ties . It may occur that multiple hospitals have the same 30-day mortality rate for a given cause of death. In those cases ties should be broken by using the hospital name. For example, in Texas (“TX”), the hospitals with lowest 30-day mortality rate for heart failure are shown here.


Hospital.Name Rate Rank
3935 FORT DUNCAN MEDICAL CENTER 8.1 1
4085 TOMBALL REGIONAL MEDICAL CENTER 8.5 2
4103 CYPRESS FAIRBANKS MEDICAL CENTER 8.7 3
3954 DETAR HOSPITAL NAVARRO 8.7 4
4010 METHODIST HOSPITAL,THE 8.8 5
3962 MISSION REGIONAL MEDICAL CENTER 8.8 6

Note that Cypress Fairbanks Medical Center and Detar Hospital Navarro both have the same 30-day rate (8.7). However, because Cypress comes before Detar alphabetically, Cypress is ranked number 3 in this scheme and Detar is ranked number 4. One can use the order function to sort multiple vectors in this manner (i.e. where one vector is used to break ties in another vector).

(state, outcome, num = "best") {
## Read outcome data

## Check that state and outcome are valid

## Return hospital name in that state with the given rank
## 30-day death rate
}

The function should check the validity of its arguments. If an invalid state value is passed to rankhospital , the function should throw an error via the stop function with the exact message “invalid state”. If an invalid outcome value is passed to rankhospital , the function should throw an error via the stop function with the exact message “invalid outcome”.

("rankhospital.R")
> rankhospital("TX", "heart failure", 4)
[1] "DETAR HOSPITAL NAVARRO"
> rankhospital("MD", "heart attack", "worst")
[1] "HARFORD MEMORIAL HOSPITAL"
> rankhospital("MN", "heart attack", 5000)
[1] NA

Save your code for this function to a file named rankhospital.R .

Part 4: Ranking hospitals in all states

Write a function called rankall that takes two arguments: an outcome name ( outcome ) and a hospital ranking ( num ). The function reads the outcome-of-care-measures.csv file and returns a 2-column data frame containing the hospital in each state that has the ranking specified in num . For example the function call rankall(“heart attack”, “best”) would return a data frame containing the names of the hospitals that are the best in their respective states for 30-day heart attack death rates. The function should return a value for every state (some may be NA ). The first column in the data frame is named hospital , which contains the hospital name, and the second column is named state , which contains the 2-character abbreviation for the state name. Hospitals that do not have data on a particular outcome should be excluded from the set of hospitals when deciding the rankings.

Handling ties . The rankall function should handle ties in the 30-day mortality rates in the same way that the rankhospital function handles ties.

(outcome, num = "best") {
## Read outcome data

## Check that outcome is valid

## For each state, find the hospital of the given rank

## Return a data frame with the hospital names and the
## (abbreviated) state name
}

NOTE : For the purpose of this part of the assignment (and for efficiency), your function should NOT call the rankhospital function from the previous section.

The function should check the validity of its arguments. If an invalid outcome value is passed to rankall , the function should throw an error via the stop function with the exact message “invalid outcome”. The num variable can take values “best”, “worst”, or an integer indicating the ranking (smaller numbers are better). If the number given by num is larger than the number of hospitals in that state, then the function should return NA .

)
> head(rankall("heart attack", 20), 10)
hospital state
AK <NA> AK
AL D W MCMILLAN MEMORIAL HOSPITAL AL
AR ARKANSAS METHODIST MEDICAL CENTER AR
AZ JOHN C LINCOLN DEER VALLEY HOSPITAL AZ
CA SHERMAN OAKS HOSPITAL CA
CO SKY RIDGE MEDICAL CENTER CO
CT MIDSTATE MEDICAL CENTER CT
DC <NA> DC
DE <NA> DE
FL SOUTH FLORIDA BAPTIST HOSPITAL FL
> tail(rankall("pneumonia", "worst"), 3)
hospital state
WI MAYO CLINIC HEALTH SYSTEM - NORTHLAND, INC WI
WV PLATEAU MEDICAL CENTER WV
WY NORTH BIG HORN HOSPITAL DISTRICT WY
> tail(rankall("heart failure"), 10)
hospital state
TN WELLMONT HAWKINS COUNTY MEMORIAL HOSPITAL TN
TX FORT DUNCAN MEDICAL CENTER TX
UT VA SALT LAKE CITY HEALTHCARE - GEORGE E. WAHLEN VA MEDICAL CENTER UT
VA SENTARA POTOMAC HOSPITAL VA
VI GOV JUAN F LUIS HOSPITAL & MEDICAL CTR VI
VT SPRINGFIELD HOSPITAL VT
WA HARBORVIEW MEDICAL CENTER WA
WI AURORA ST LUKES MEDICAL CENTER WI
WV FAIRMONT GENERAL HOSPITAL WV
WY CHEYENNE VA MEDICAL CENTER WY

Save your code for this function to a file named rankall.R .

My Solution



best <- function(state, outcome) { ## Read outcome data data <- read.csv("outcome-of-care-measures.csv") ## Check that state and outcome are valid states <- levels(data[, 7])[data[, 7]] state_flag <- FALSE for (i in 1:length(states)) { if (state == states[i]) { state_flag <- TRUE } } if (!state_flag) { stop ("invalid state") } if (!((outcome == "heart attack") | (outcome == "heart failure") | (outcome == "pneumonia"))) { stop ("invalid outcome") } ## Return hospital name in that state with lowest 30-day death rate col <- if (outcome == "heart attack") { 11 } else if (outcome == "heart failure") { 17 } else { 23 } data[, col] <- suppressWarnings(as.numeric(levels(data[, col])[data[, col]])) data[, 2] <- as.character(data[, 2]) statedata <- data[grep(state, data$State), ] orderdata <- statedata[order(statedata[, col], statedata[, 2], na.last = NA), ] orderdata[1, 2] } ##Part 3: rankhospital.R:

rankhospital <- function(state, outcome, num = "best") { ## Read outcome data data <- read.csv("outcome-of-care-measures.csv") ## Check that state and outcome are valid states <- levels(data[, 7])[data[, 7]] state_flag <- FALSE for (i in 1:length(states)) { if (state == states[i]) { state_flag <- TRUE } } if (!state_flag) { stop ("invalid state") } if (!((outcome == "heart attack") | (outcome == "heart failure") | (outcome == "pneumonia"))) { stop ("invalid outcome") } ## Return hospital name in that state with the given rank 30-day death ## rate col <- if (outcome == "heart attack") { 11 } else if (outcome == "heart failure") { 17 } else { 23 } data[, col] <- suppressWarnings(as.numeric(levels(data[, col])[data[, col]])) data[, 2] <- as.character(data[, 2]) statedata <- data[grep(state, data$State), ] orderdata <- statedata[order(statedata[, col], statedata[, 2], na.last = NA), ] if(num == "best") { orderdata[1, 2] } else if(num == "worst") { orderdata[nrow(orderdata), 2] } else{ orderdata[num, 2] } }
##Part 4: rankall.R: rankall <- function(outcome, num = "best") { ## Read outcome data data <- read.csv("outcome-of-care-measures.csv") ## Check that outcome is valid if (!((outcome == "heart attack") | (outcome == "heart failure") | (outcome == "pneumonia"))) { stop ("invalid outcome") } ## For each state, find the hospital of the given rank col <- if (outcome == "heart attack") { 11 } else if (outcome == "heart failure") { 17 } else { 23 } data[, col] <- suppressWarnings(as.numeric(levels(data[, col])[data[, col]])) data[, 2] <- as.character(data[, 2]) # Generate an empty vector that will be filled later, row by row, to # generate the final output. output <- vector() states <- levels(data[, 7]) for(i in 1:length(states)) { statedata <- data[grep(states[i], data$State), ] orderdata <- statedata[order(statedata[, col], statedata[, 2], na.last = NA), ] hospital <- if(num == "best") { orderdata[1, 2] } else if(num == "worst") { orderdata[nrow(orderdata), 2] } else{ orderdata[num, 2] } output <- append(output, c(hospital, states[i])) } ## Return a data frame with the hospital names and the (abbreviated) ## state name output <- as.data.frame(matrix(output, length(states), 2, byrow = TRUE)) colnames(output) <- c("hospital", "state") rownames(output) <- states output }

A Good Tutorial

Link: https://github.com/DanieleP/PA3-tutorial

  • 1. Introduction
  • 2. Part 1: Plot the 30-day mortality rates for heart attack
  • 3. Part 2: Finding the best hospital in a state
  • 4. Part 3: Ranking hospitals by outcome in a state
  • 5. Part 4: Ranking hospitals in all states
  • 6. My Solution
  • 8. A Good Tutorial

Programming Assignment 3: Quiz >> R Programming

9. What result is returned by the following code?

Related Questions & Answers:

Leave a comment cancel reply.

Save my name, email, and website in this browser for the next time I comment.

Please Enable JavaScript in your Browser to Visit this Site.

  • Programming Assignment 3 - R Programming
  • by Wagner Pinheiro
  • Last updated over 7 years ago
  • Hide Comments (–) Share Hide Toolbars

Twitter Facebook Google+

Or copy & paste this link into an email or IM:

IMAGES

  1. Programming Assignment 3 Instructions Hospital Quality

    programming assignment 3 hospital quality

  2. Solved Hospital Simulation In this programming assignment,

    programming assignment 3 hospital quality

  3. Programming Assignment Unit 7.pdf

    programming assignment 3 hospital quality

  4. Healthcare Quality Improvement Strategies For Hospitals

    programming assignment 3 hospital quality

  5. Programming Assignment 3 Instructions Hospital Quality

    programming assignment 3 hospital quality

  6. Systems

    programming assignment 3 hospital quality

VIDEO

  1. Programming Assignment 3 COP3330

  2. NPTEL Programming In Java Week 7 Programming Assignment 3 Answers l March 2024

  3. Hospital Management Books 📚|1st Semester Book List+ Syllabus +Notes💗|Easy Or Hard? Personal Opinion

  4. Hospital Management System

  5. 3. Project 2 Health Insurance Cost Prediction End To End Machine Learning Project

  6. #3 Hospital Management System Project Tutorial Login Module

COMMENTS

  1. Programming Assignment 3: Hospital Quality

    This document contains information about many other files that are not included with this programming assignment. You will want to focus on the variables for Number 19 ("Outcome of Care Measures.csv") and Number 11 ("Hospital Data.csv"). You may find it useful to print out this document (at least the pages for Tables 19 and 11) to have ...

  2. akshaykher/Programming-Assignment-3-Hospital-Quality

    There are 3 tests that need to be passed for this part of the assignment. #3. Ranking hospitals by outcome in a state Write a function called rankhospital that takes three arguments: the 2-character abbreviated name of a state (state), an outcome (outcome), and the ranking of a hospital in that state for that outcome (num).

  3. R Programming-Assignment-3--Hospital-Quality

    R Programming-Assignment-3--Hospital-Quality. Contribute to basmaNasser/Programming-Assignment-3--Hospital-Quality development by creating an account on GitHub.

  4. RPubs

    Or copy & paste this link into an email or IM:

  5. R programming Assignment 3 week 4

    r programming assignment 3 week 4 fan ouyang 8/21/2017. ... ## hospital state ## ak <na> ak ## al d w mcmillan memorial hospital al ## ar arkansas methodist medical center ar ## az john c lincoln deer valley hospital az ## ca sherman oaks hospital ca ## co sky ridge medical center co ## ct midstate medical center ct ## dc <na> dc ## de <na> de ...

  6. Programming With R Assignment 3

    Programming With R Assignment 3 Jeremias Lalis May 12, 2016. ... The purpose of the web site is to provide data and information about the quality of care at over 4,000 Medicare-certified hospitals in the U.S. ... 1 AK 2 D W MCMILLAN MEMORIAL HOSPITAL AL 3 ARKANSAS METHODIST MEDICAL CENTER AR 4 JOHN C LINCOLN DEER VALLEY HOSPITAL AZ 5 SHERMAN ...

  7. Programming Assignment 3 INSTRUCTIONS: Hospital Qualityent

    RPubs - Programming Assignment 3 INSTRUCTIONS: Hospital Qualityent. Programming Assignment 3 INSTRUCTIONS: Hospital Qualityent. by Guilherme Nunes. Last updated over 3 years ago.

  8. R Programming Assignment Three

    R Programming Assignment Three Fraser Stark 20/09/2019. Coursera R Programming - Hospital Care Outcomes. Introduction. The data for this assignment come from the Hospital Compare web site ... The purpose of the web site is to provide data and information about the quality of care at over 4,000 Medicare-certified hospitals in the U.S. This ...

  9. akshaykher / Programming-Assignment-3-Hospital-Quality Public

    Contribute to akshaykher/Programming-Assignment-3-Hospital-Quality development by creating an account on GitHub.

  10. Programming assignment 3 for Coursera "R Programming" course by Johns

    Star 2 2. Fork 26 26. Programming assignment 3 for Coursera "R Programming" course by Johns Hopkins University. Raw. best.R. best <- function (state, outcome) {. ## Read outcome data. ## Check that state and outcome are valid. ## Return hospital name in that state with lowest 30-day death.

  11. R Programming

    Week 1 Quiz • 30 minutes. 7 programming assignments • Total 1,260 minutes. swirl Lesson 1: Basic Building Blocks • 180 minutes. swirl Lesson 2: Workspace and Files • 180 minutes. swirl Lesson 3: Sequences of Numbers • 180 minutes. swirl Lesson 4: Vectors • 180 minutes. swirl Lesson 5: Missing Values • 180 minutes.

  12. RPubs

    Or copy & paste this link into an email or IM:

  13. Hospital Quality Project

    Hospital Quality Project nthehai01 2/9/2022. Introduction. Download the file ProgAssignment3-data.zip file containing the data for Programming Assignment 3 from the Coursera web site. Unzip the file in a directory that will serve as your working directory. When you start up R make sure to change your working directory to the directory where you ...

  14. Coursera

    Download ZIP. Coursera - R Programming - Assignment 3 (Hospital Quality) test suites. Raw. best-tests.R. 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 ...

  15. GitHub

    R-Programming-Hospital-Quality. Programming Assignment 3 R Programming Introduction Download the file ProgAssignment3-data.zip file containing the data for Programming Assignment 3 from the Coursera web site. Unzip the file in a directory that will serve as your working directory.

  16. GitHub

    If there is a tie for the best hospital for a given outcome, then the hospital names should\nbe sorted in alphabetical order and the first hospital in that set should be chosen (i.e. if hospitals "b", "c",\nand "f" are tied for best, then hospital "b" should be returned).

  17. RPubs

    Or copy & paste this link into an email or IM:

  18. R Programming Assignment 3: Hospital Quality // 小默的博客

    Introduction. Download the file ProgAssignment3-data.zipfile containing the data for Programming Assignment 3 from the Coursera web site. Unzip the file in a directory that will serve as your working directory. When you start up R make sure to change your working directory to the directory where you unzipped the data.

  19. GitHub

    HL7 Stuff AND R Programming Assignment 3. This repo started out as a place for a Johns Hopkins Data Scientist course I took on R programming. One of the course assignments (in here) was to interrogate some HL7 CSV data and produce some analysis.

  20. RPubs

    Coursera R programming week 4 assignment 3; by Haolei Fang; Last updated over 8 years ago; Hide Comments (-) Share Hide Toolbars

  21. Programming Assignment 3: Quiz >> R Programming

    Programming Assignment 3: Quiz >> R Programming 1. What result is returned by the following code? best ("SC", "heart attack") CAROLINAS HOSPITAL SYSTEMMCLEOD MEDICAL CENTER - DARLINGTONMUSC MEDICAL CENTERMARY BLACK MEMORIAL HOSPITALLAKE CITY COMMUNITY HOSPITALGRAND STRAND REG MED CENTER 2. What result is returned by the following code? best ...

  22. Repository for R Programming Assignment 3: Hospital Quality

    Saved searches Use saved searches to filter your results more quickly

  23. RPubs

    Password. Forgot your password? Sign InCancel. RPubs. by RStudio. Sign inRegister. Programming Assignment 3 - R Programming. by Wagner Pinheiro. Last updatedover 7 years ago.