check_completeness_range: Check if data for different types are available for a range...

View source: R/05_checks.R

check_completeness_rangeR Documentation

Check if data for different types are available for a range of dates

Description

Accepts either the output of parse_data for a single individual or the output of merge_all for multiple individuals. Every individual found in the data is checked separately.

Usage

check_completeness_range(
  data,
  first_date,
  last_date,
  necessary_types = c("cgm", "basal", "bolus", "carbs")
)

Arguments

data

A list with all data found for one individual (the output of parse_data) or for multiple individuals (the output of merge_all). Requires cleaned and standardized data.

first_date

A character string representing the first date for which data should be available.

last_date

A character string representing the last date (included) for which data should be available.

necessary_types

A character vector with type names for which data should be available.

Value

No return value, called for side effects. Issues a message for every individual and data type with missing days.

Examples

# The example export covers 2026-06-22 only
path <- system.file("extdata", "glooko_example.zip", package = "aidR")
data <- parse_data(id = "1", paths = path)
check_completeness_range(data, first_date = "2026-06-21", last_date = "2026-06-23")

aidR documentation built on Oct. 28, 2026, 5:13 p.m.