check_completeness {FlowScreen}R Documentation

Check Completeness

Description

Determine if the desired completeness criteria are being met. This considers if the date range of interest is complete, and whether internal gaps are longer than the criteria. There is an option for allowing the data set to be padded with an optional number of years and then tested using the same criteria. Function returns TRUE if the criteria are met and FALSE if not, and a numeric code that indicates the mode of failure or success.

Usage

check_completeness(
  data,
  st_yr,
  nd_yr,
  allowed = 3,
  period = 10,
  pad = NULL,
  my = NULL
)

Arguments

data

Result from missingness.

st_yr

Starting year of the desired period.

nd_yr

Ending year of the desired period.

allowed

Maximum number of years allowed to be missing in the period.

period

Period of years that cannot exceed an allowed gap.

pad

Optional number of years to pad the data set.

my

Optional maximum number of years allowed to be missing with padding.

Value

A list containing:

Messages indicating the reason for failure

Author(s)

Paul Whitfield

Examples

robin_path <- system.file("extdata", "ROBIN_example.csv", package = "FlowScreen")

TS <- read.flows(robin_path)
res <- missingness(TS, title = TRUE)
check_completeness(res, st_yr = 1985, nd_yr = 2014, allowed = 3, period = 10)


[Package FlowScreen version 2.1 Index]