library(tidyverse)
filename <- "https://raw.githubusercontent.com/MoH-Malaysia/covid19-public/main/epidemic/linelist/linelist_deaths.csv"
mydata <- read_csv(file = filename)
#> Rows: 21124 Columns: 11
#> -- Column specification --------------------------------------------------------
#> Delimiter: ","
#> chr (2): vaxtype, state
#> dbl (5): age, male, bid, malaysian, comorb
#> date (4): date, date_positive, date_dose1, date_dose2
#>
#> i Use `spec()` to retrieve the full column specification for this data.
#> i Specify the column types or set `show_col_types = FALSE` to quiet this message.
mydata
#> # A tibble: 21,124 x 11
#> date date_positive date_dose1 date_dose2 vaxtype state age male
#> <date> <date> <date> <date> <chr> <chr> <dbl> <dbl>
#> 1 2020-03-17 2020-03-12 NA NA <NA> Johor 34 1
#> 2 2020-03-17 2020-03-14 NA NA <NA> Sarawak 60 1
#> 3 2020-03-20 2020-03-11 NA NA <NA> Sabah 58 1
#> 4 2020-03-21 2020-03-17 NA NA <NA> Kelantan 69 1
#> 5 2020-03-21 2020-03-13 NA NA <NA> Melaka 50 1
#> 6 2020-03-21 2020-03-21 NA NA <NA> Sarawak 39 0
#> 7 2020-03-21 2020-03-14 NA NA <NA> W.P. Kual~ 57 1
#> 8 2020-03-22 2020-03-18 NA NA <NA> Perlis 48 1
#> 9 2020-03-22 2020-03-14 NA NA <NA> Pulau Pin~ 73 1
#> 10 2020-03-22 2020-03-20 NA NA <NA> Sarawak 80 0
#> # ... with 21,114 more rows, and 3 more variables: bid <dbl>, malaysian <dbl>,
#> # comorb <dbl>
ggplot(data = mydata, aes(x = age)) +
geom_histogram(binwidth = 5)
Variable type: numeric
Created on 2021-09-14 by the reprex package (v2.0.1)