Skip to contents

This function read and bind all files available in a directory and returns the database in data table format.

Usage

cbr_data(dir = ".", filepath = ".", save2disk = FALSE, date = NULL)

Arguments

dir

a character string, corresponding the directory containing the files downloaded from the COVID-19 Portal.

filepath

a character string, corresponding the folder where files will be save. By default, the current directory is used (see getwd()).

save2disk

logical. If TRUE, the database is saved in a file in csv format.

date

a date string, in year-month-day format (e.g.: "2022-11-06").

  • Data from "2022-10-06" to "2022-10-07": date = c("2022-10-06","2022-10-07")

Value

a data.table object with 17 columns, corresponding the database.

Examples

if (FALSE) {
covid_br_db <- cbr_data("./data-raw")
}