Description Usage Arguments Value Examples
Filter the final result of the object lab
1 2 | ## S3 method for class 'lab'
choose_test(obj, test = "mis", group_id = T)
|
obj |
An object. Class lab. |
test |
A character scalar. Parameters, which use to filter the final dataset, default: "mis": "ok" - analysis, which has a correct estimate of the result, "mis" - analysis, which has an incorrect estimate of the result, "skip" - analysis, which has an empty value of the estimate, "null" - analysis, which has an empty result and value of the estimate. |
group_id |
A logical scalar, default is TRUE.True is grouped by id, otherwise, it isn't grouped. |
The filtered dataset by a value of test
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ID <- c("01", "02", "03")
SITE <- c("site 01", "site 02", "site 03")
AGE <- c("19", "20", "22")
SEX <- c("f", "m", "f")
GLUC_V1 <- c(5.5, 4.1, 9.7)
GLUC_IND_V1 <- c("norm", "no", "cl")
AST_V2 <- c("30", "48", "31")
AST_IND_V2 <- c(NA, "norm", "norm")
df <- data.frame(
ID, SITE, AGE, SEX,
GLUC_V1, GLUC_IND_V1,
AST_V2, AST_IND_V2,
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.