read_covid: Read downloaded COVerAGE-DB datasets

View source: R/read_covid.R

read_covidR Documentation

Read downloaded COVerAGE-DB datasets

Description

Reads one of the COVerAGE-DB datasets that was locally saved. The advantage over the usual reading functions, is that the columns are ensured to have their correct data types according to COVerAGE-DB documentation.

Usage

read_covid(
  zippath,
  data = c("inputDB", "Output_5", "Output_10", "qualityMetrics"),
  return = c("data.frame", "data.table", "tibble"),
  ...
)

Arguments

zippath

Character. The local zip archive of the downloaded dataset.

data

The name of the dataset that is to be read. Can be one of the the following: "inputDB", "Output_5", "Output_10", "qualityMetrics".

return

What should be the return type? Can be on of the following: "data.frame", "data.table", "tibble".

...

Additional named arguments passed to data.table::fread()

Details

This function can be used to read a previously downloaded datasets. However, to get the latest version, it's better to use download_covid(). Reading the complete 'inputDB' is quite memory intensive. It may fail if R cannot allocate enough memory for the dataset.

Value

By default a data frame with the uncompressed dataset. Can be set to return either a data table or a tibble. The return type is controlled by the 'return' parameter.


eshom/covid-age-data documentation built on May 1, 2022, 12:22 a.m.