check_for_data_gaps: Check for substantial gaps in the time series

View source: R/check_for_data_gaps.R

check_for_data_gapsR Documentation

Check for substantial gaps in the time series

Description

Check for substantial gaps in the time series

Usage

check_for_data_gaps(dat, ..., gap_length = 2, gap_warning = 6, quiet = FALSE)

Arguments

dat

Data frame with at least three columns: TIMESTAMP (must be possible to convert to POSIXct), DEPTH, and VALUE. If column VARIABLE is included, it must have one unique entry. May also include columns with grouping variables passed to .... Other columns will be ignored.

...

Additional columns in dat to use as grouping variables. Results are automatically grouped by DEPTH.

gap_length

The length of time in hours to consider a sampling gap. Default is gap_length = 2 hours, which is twice the sampling interval of the least frequent sensor.

gap_warning

The length of time in hours to consider a substantial sampling gap. A warning can be printed if any gaps exceed this duration. Default is gap_warning = 6 hours.

quiet

Logical argument to suppress Warning message when gap lengths exceed gap_warning. If quiet = TRUE, the Warning will not be printed.

Value

Returns summary table with GAP_START,GAP_LENGTH_DAYS, and GAP_LENGTH_HOURS for each grouping variable for all intervals between observations that exceed gap_length.

A warning will be displayed if any intervals exceed gap_warning.


dempsey-CMAR/tgc documentation built on Oct. 20, 2023, 6:45 p.m.