Assignment 3: tutorial
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Assignment 3: tutorial

Series of functions that show concepts useful to complete Assignment 3

Assignment 3 requries to manage a big database, rank hospitals by different factors and apply some complex criteria. To make the principles easier to be understood, I created smaller data frames and functions. There are plenty of ways to solve Assignment 3, and below you find just my suggestions. I'm sure there are better ways to do it.

To run the functions below, you need to download and read these two small csv files: cities.csv citiesNA.csv

  1. How to order a data frame by the values in its columns

[sort_by_column () and sort_by_columns ()] (

  1. How to manage NA when ordering data frames


  1. How to order only a specific subset of a data frame

[sort_country()] (

  1. How to return a specific ranking after ordering

[find_city_rank() and find_last_city()] (

  1. How to return a data frame of specific rankings for each subset

[rank_by_country()] (