check_completeness: Check if data for different types are available for at least...

View source: R/05_checks.R

check_completenessR Documentation

Check if data for different types are available for at least one day

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(data, 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.

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 data.

Examples

# A mylife export contains no CGM and no basal data
path <- system.file("extdata", "mylife_example.csv", package = "aidR")
data <- parse_data(id = "1", paths = path)
check_completeness(data)

# Only require bolus and carbohydrate data
check_completeness(data, necessary_types = c("bolus", "carbs"))

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