thin_time_series: thin a time series matrix

Description Usage Arguments Value

View source: R/helpers.R

Description

thin a time series matrix

Usage

1
2
thin_time_series(time_series_matrix, thin_every = 0,
  thin_integer = FALSE, thin_by_sum = FALSE)

Arguments

time_series_matrix

matrix where each column corresponds to a given time, and the column names are the times

thin_every

an integer. If 0, ignore. Otherwise, thin the matrix every this many columns

thin_integer

a logical. If TRUE, thin the matrix to integer values of times. If FALSE, ignore

thin_by_sum

logical. IF TRUE, thin by adding together columns (e.g. if thin_every = 2, add togeher columns 1-2, columns 3-4 etc.) This is useful for thinning quantities such as incidence. If FALSE, ignore.

Value

a thinned matrix with the same number of rows as time_series_matrix, and fewer columns


jameshay218/vaxedemic documentation built on Jan. 30, 2020, 2:58 a.m.