data_to_daily: Converts non-daily data to daily data, with optional...

Description Usage Arguments Value

View source: R/data_to_daily.R

Description

Takes in a dataset with implicit missing data (missing rows) or interval data and expands it into daily data, filling in with NAs, and then optionally linearly interpolating all NA values.

Usage

1
data_to_daily(data_notdaily, valuefield, interpolate = TRUE)

Arguments

data_notdaily

Input dataset with values in valuefield, and date field in "obs_date". Function will group on all other fields present and create combinations of those plus the date.

valuefield

Field that the observation values are in.

interpolate

Logical to whether or not interpolate all NAs in dataset before returning.

Value

Returns tibble expanded to have either explicit missing, or linearly interpolated values for every date from the minimum to maximum dates in the original dataset.


EcoGRAPH/epidemiar documentation built on Nov. 13, 2020, 5:31 p.m.