#' body measurement data
#' from bmx file
#'
#' @param data data
#' @param years years
#' @param Weight Weight (kg)
#' @param BMI Body Mass Index(kg/m**2)
#' @param Year logical
#'
#' @return body measurement data
#' @export
#'
attach_bodyMeasure <- function(data,years,
Weight,
BMI,
Year=FALSE){
years <- data_years(data,years)
tsv <- nhs_tsv('bmx',years=years,cat=FALSE)
var <- c() |>
attach_variable_formula(BMI,'bmxbmi') |>
attach_variable_formula(Weight,'bmxwt')
d <- nhs_read(tsv,var,cat = FALSE)
attach_return_data(data,d,Year,join='seqn')
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.