Learn R Programming

clinUtils (version 0.1.4)

getLabelParamcd: Get label for a parameter code

Description

This function gets the labele for a parameter code extracted from the 'PARAM' column.

Usage

getLabelParamcd(paramcd, data, paramcdVar = "PARAMCD", paramVar = "PARAM")

Value

Named character vector with label for parameter code or paramcd if label is missing.

Arguments

paramcd

Character vector with parameter code(s).

data

Data.frame with data.

paramcdVar

String with column containing the paramcd parameter, 'PARAMCD' by default (for ADaM format).

paramVar

String with column containing the param parameter, 'PARAM' by default(for ADaM format).

Author

Laure Cougnaud

Examples

Run this code
# for ADaM
data(dataADaMCDISCP01)
getLabelParamcd(paramcd = "CHOL", data = dataADaMCDISCP01$ADLBC)
# for SDTM
data(dataSDTMCDISCP01)
getLabelParamcd(
  paramcd = "ALB", 
  data = dataSDTMCDISCP01$LB, 
  paramcdVar = "LBTESTCD", 
  paramVar = "LBTEST"
)

Run the code above in your browser using DataLab