Learn R Programming

dmtools (version 0.2.4)

lab: Create object lab

Description

Create object lab

Usage

lab(
  file,
  id,
  age,
  sex,
  norm,
  no_norm,
  is_post = T,
  cl_sign = NA,
  site = NA,
  name_to_find = "name_is_norm"
)

Arguments

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.

norm

A normal estimate, for example, "NORMAL".

no_norm

An abnormal estimate, for example, "ABNORMAL".

is_post

A logical scalar, default is TRUE. True is postfix, otherwise, prefix.

cl_sign

A clinical significant estimate, for example, "CLISIG", default: NA.

site

A site number, default: NA.

name_to_find

A character scalar. For search prefixes or postfixes, default is "name_is_norm".

Value

The object lab.

Examples

Run this code
# NOT RUN {
obj_lab <- lab("lab_refer.xlsx", id, age, sex, 1, 2)
obj_lab <- lab("lab_refer.xlsx", id, age, sex, "NORMAL", "NOCLISIG", cl_sign = "CLISIG")
obj_lab <- lab("lab_refer.xlsx", id, age, sex, "norm", "no", FALSE)

# }

Run the code above in your browser using DataLab