Learn R Programming

testdat (version 0.2)

test_continuous_date: Test for date continuity

Description

Determine whether date column contains a continuous range of times

Usage

test_continuous_date(dat, index, form = ymd, granularity = "days")

Arguments

dat
data frame to test
index
index of column containing dates
form
a lubridate function giving the format the dates should be in
granularity
how often are measurements expected? defaults to 'days'.

Value

returns at least some of the missing dates (measured in granularity) if there are any, otherwise returns TRUE

Details

by "some of" the missing dates, we mean the function returns the first [granularity] after the one present in the dataset. However, more than just the first unit might be missing.