Forms a label for a column (ycol method) or columns (yspec method). Use purrr::map or purrr::map_chr to simply extract the label field.

ys_get_label(x, ...)

Arguments

x

ycol or yspec object

...

passed to label methods

Examples

spec <- ys_help$spec()

ys_get_label(spec)
#> $C
#> [1] "comment character"
#> 
#> $NUM
#> [1] "record number"
#> 
#> $ID
#> [1] "subject identifier"
#> 
#> $SUBJ
#> [1] "subject identifier"
#> 
#> $TIME
#> [1] "time after first dose"
#> 
#> $SEQ
#> [1] "data type"
#> 
#> $CMT
#> [1] "compartment number"
#> 
#> $EVID
#> [1] "event ID"
#> 
#> $AMT
#> [1] "dose amount"
#> 
#> $DV
#> [1] "dependent variable"
#> 
#> $AGE
#> [1] "age"
#> 
#> $WT
#> [1] "weight"
#> 
#> $CRCL
#> [1] "creatinine clearance"
#> 
#> $ALB
#> [1] "serum albumin"
#> 
#> $BMI
#> [1] "body mass index"
#> 
#> $AAG
#> [1] "alpha-1-acid glycoprotein"
#> 
#> $SCR
#> [1] "serum creatinine"
#> 
#> $AST
#> [1] "aspartate aminotransferase"
#> 
#> $ALT
#> [1] "alanine aminotransferase"
#> 
#> $HT
#> [1] "Height"
#> 
#> $CP
#> [1] "Child-Pugh score"
#> 
#> $TAFD
#> [1] "time after first dose"
#> 
#> $TAD
#> [1] "time after dose"
#> 
#> $LDOS
#> [1] "last dose amount"
#> 
#> $MDV
#> [1] "missing DV indicator"
#> 
#> $BLQ
#> [1] "below limit of quantification"
#> 
#> $PHASE
#> [1] "study phase indicator"
#> 
#> $STUDY
#> [1] "study number"
#> 
#> $RF
#> [1] "renal function stage"
#> 

ys_get_label(spec$WT)
#> [1] "weight"
if (FALSE) {
purrr:::map(spec,"label")
}