Remove or replace values that are NA
.
Usage
HandleMissingValues(na_remove = FALSE, na_replace = NULL)
Arguments
- na_remove
boolean value, if `TRUE` remove `NA`s in series variable
- na_replace
numeric value to replace `NA`s in series variable, if NULL
no replacement is performed
Value
a function to remove or replace missing values.
## Returned Function
- Arguments
* `data` data frame containing time series data
* `series_variable` column name of series variable in `data`, default is "deaths"
- Return - all fields in `data` with either `NA` records removed or replaced