Skip to contents

Remove leading or trailing zeroes in a time series data set.

Usage

TrimSeries(zero_lead = FALSE, zero_trail = FALSE)

Arguments

zero_lead

boolean value, if `TRUE` remove leading zeroes in `data`

zero_trail

boolean value, if `TRUE` remove trailing zeroes in `data`

Value

a function to remove to remove leading and/or trailing zeroes

## Returned Function

- Arguments * `data` data frame containing time series data * `series_variable` column name of series variable in `data`, default is "deaths" * `time_variable` column name of time variable in `data`, default is "period_end_date" - Return - all fields in `data` with filtered records to trim leading and/or trailing zeroes