#' fasting triglycerides and glucose index ,TyG
#'
#' @param data data
#' @param years years
#' @param Year logical
#'
#' @return fasting triglycerides and glucose index ,TyG
#' @export
#'
attach_TyG <- function(data,years,Year=FLASE){
years <- data_years(data,years)
d <- attach_HemalBiochemistry(years = years,
fast_triglyceride1 = 'ftrig',
fast_glucose1 = 'fglu')
d$TyG <- log(d$ftrig * d$fglu /2)
attach_return_data(data,d,Year,'seqn')
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.