Skip to contents

Standardizes height to cm and weight to kg, calculating and validating BMI.

Usage

harmonize_anthropometrics(
  con,
  measurement_table = "measurement",
  view_name = "measurement_harmonized_anthropometrics",
  calculate_bmi = TRUE,
  replace_implausible_bmi = TRUE,
  create_view = TRUE
)

Arguments

con

DuckDB DBI connection.

measurement_table

Name of source measurement table or view.

view_name

Name of temporary view to create.

calculate_bmi

Logical. Calculate BMI where height and weight are available.

replace_implausible_bmi

Logical. Replace implausible BMI (<10 or >120) with calculated BMI.

create_view

Logical. Whether to register the view.

Value

A data frame with counts of standardized records and calculated BMIs.