assemble_data: Assemble WNV data for analysis

Description Usage Arguments Value

View source: R/assemble_data.R

Description

This function pulls together all the different datasets from package wnvdata and the local case data. Some basic consistency checks are performed.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
assemble_data(
  x,
  path_2_case_data = here::here("data-raw/wnv_by_county.csv"),
  case_type = c("neuro", "all"),
  match_variable = "fips",
  case_variable = "cases",
  measure = NULL,
  nUnits = NULL,
  startUnit = NULL,
  unit = NULL
)

Arguments

x

a data.frame or tibble with the prediction targets

path_2_case_data

character file path to the case data

case_type

character type of case data

match_variable

character name of the field to match data on

case_variable

character name of the case field in the case data

measure

character vector of variables to use for lagging

nUnits

integer vector of number of units to lag backwards

startUnit

integer unit to start lagging from

unit

character name of the variable identifying the lag units

Value

a data.frame ready to estimate distributed lag models


atyre2/unlwnv documentation built on Oct. 25, 2020, 10:18 a.m.