# NOT RUN {
id <- c("01", "02", "03")
site <- c("site 01", "site 02", "site 03")
age <- c("19", "20", "22")
sex <- c("f", "m", "f")
gluc_post <- c(5.5, 4.1, 9.7)
gluc_res_post <- c("norm", "no", "cl")
ast_post <- c("30", "48", "31")
ast_res_post <- c(NA, "norm", "norm")
df <- data.frame(
id, site, age, sex,
gluc_post, gluc_res_post,
ast_post, ast_res_post,
stringsAsFactors = FALSE )
refs <- system.file("labs_refer.xlsx", package = "dmtools")
obj_lab <- lab(refs, id, age, sex, "norm", "no")
obj_lab <- check(obj_lab, df)
choose_test(obj_lab, "mis")
# }
Run the code above in your browser using DataLab