indianacovid19data has csv file types for all its datasets in the inst/extdata directory. This function makes them easy to access.

path_to_file(name = NULL)

Arguments

name

Name of file in quotes with extension. If NULL, the available files will be listed.

Source

The function is similar to palmerpenguins::path_to_file() with a few edits.

Details

The csv file for hosp_react_tab doesn't include the list columns.

Examples

path_to_file()
#>  [1] "age_cases_heat.csv"                "age_death_line.csv"               
#>  [3] "age_hosp_line.csv"                 "beds_vents_complete.csv"          
#>  [5] "dash_ci_line.csv"                  "goog_mob_ind.csv"                 
#>  [7] "hosp_msas_line.csv"                "hosp_react_tab.csv"               
#>  [9] "illinois_tests_complete.csv"       "ind_age_complete.csv"             
#> [11] "ind_race_complete.csv"             "ind_tests_complete.csv"           
#> [13] "median_age_bubble.csv"             "mich_tests_complete.csv"          
#> [15] "mort_hosp_line.csv"                "msa_cases100_posrate_historic.csv"
#> [17] "open_tab_reg.csv"                  "wisc_tests_complete.csv"          
path_to_file("hosp_msas_line.csv")
#> [1] "/home/runner/work/_temp/Library/indianacovid19data/extdata/hosp_msas_line.csv"
head(read.csv(path_to_file("hosp_msas_line.csv")))
#>     date roll_mean_staff_short_perc mean_mort_rate roll_mean_admiss  skewness
#> 1 Dec 08                  0.1767381      0.1276227         426.8571 0.8701146
#> 2 Dec 09                  0.1767381      0.1290508         392.4286 0.8597092
#> 3 Dec 10                  0.1793673      0.1301993         358.1429 0.8463110
#> 4 Dec 11                  0.1812771      0.1300213         345.8571 0.8493029
#> 5 Dec 12                  0.1802384      0.1281706         309.4286 0.8464296
#> 6 Dec 13                  0.1791996      0.1302980         361.4286 0.8361402