Forms a short for a column (ycol
method) or columns (yspec
method). Use
purrr::map or purrr::map_chr to simply extract the short field.
ys_get_short(x, short_max = Inf, title_case = FALSE, ...)
ycol or yspec object
if short
is found, but contains more than short_max
characters, col
will be used
short
will be converted with tools::toTitleCase if it
is found
passed to short methods; see details
spec <- ys_help$spec()
ys_get_short(spec)
#> $C
#> [1] "comment character"
#>
#> $NUM
#> [1] "record number"
#>
#> $ID
#> [1] "subject identifier"
#>
#> $SUBJ
#> [1] "subject identifier"
#>
#> $TIME
#> [1] "TIME"
#>
#> $SEQ
#> [1] "SEQ"
#>
#> $CMT
#> [1] "compartment number"
#>
#> $EVID
#> [1] "event ID"
#>
#> $AMT
#> [1] "dose amount"
#>
#> $DV
#> [1] "dependent variable"
#>
#> $AGE
#> [1] "age"
#>
#> $WT
#> [1] "weight"
#>
#> $CRCL
#> [1] "CRCL"
#>
#> $ALB
#> [1] "albumin"
#>
#> $BMI
#> [1] "BMI"
#>
#> $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] "MDV"
#>
#> $BLQ
#> [1] "below limit of quantification"
#>
#> $PHASE
#> [1] "study phase indicator"
#>
#> $STUDY
#> [1] "study number"
#>
#> $RF
#> [1] "renal function stage"
#>
ys_get_short(spec$WT)
#> [1] "weight"
if (FALSE) {
purrr:::map(spec,"short")
}