Create object lab
lab( file, id, age, sex, normal, abnormal, is_post = T, name_to_find = "LBNRIND" )
| file | A character scalar. Path to the laboratory's reference in the excel table. |
|---|---|
| id | A column name of the subject id in the dataset, without quotes. |
| age | A column name of the subject age in the dataset, without quotes. |
| sex | A column name of the subject sex in the dataset, without quotes. |
| normal | A normal estimate, for example, "NORMAL". |
| abnormal | An abnormal estimate, for example, "ABNORMAL". |
| is_post | A logical scalar, default is TRUE. True is postfix, otherwise, prefix. |
| name_to_find | A character scalar. For search prefixes or postfixes, default is "LBNRIND". |
The object lab.
obj_lab <- lab("lab_refer.xlsx", ID, AGE, SEX, 1, 2) obj_lab <- lab("lab_refer.xlsx", ID, AGE, SEX, "NORMAL", "ABNORMAL") obj_lab <- lab("lab_refer.xlsx", ID, AGE, SEX, "norm", "no", FALSE)