Load packages library(tidyverse) Read yearly_deaths_by_clinic.csv into yearly yearly <- read_csv("yearly_deaths_by_clinic.csv") ## ## ── Column specification ──────────────────────────────────────────────────────── ## cols( ## year = col_double(), ## births = col_double(), ## deaths = col_double(), ## clinic = col_character() ## ) Print out yearly head(yearly) ## # A tibble: 6 x 4 ## year births deaths clinic ## <dbl> <dbl> <dbl> <chr> ## 1 1841 3036 237 clinic 1 ## 2 1842 3287 518 clinic 1 ## 3 1843 3060 274 clinic 1 ## 4 1844 3157 260 clinic 1 ## 5 1845 3492 241 clinic 1 ## 6 1846 4010 459 clinic 1 Adding a new column to yearly with proportion of deaths per no.