Primary Keys: Labels
var_relabel.Rd
Relabel a subset of variables in a data set.
Arguments
- x
(
data.frame
)
Data frame containing variables to which labels are applied.- ...
(
named character
)
Name-Value pairs, where name corresponds to a variable name inx
and the value to the new variable label.
Examples
adsl <- radsl()
var_relabel(adsl,
STUDYID = "Study Identifier",
USUBJID = "Unique Subject Identifier"
)
#> # A tibble: 400 × 55
#> STUDYID USUBJID SUBJID SITEID AGE AGEU SEX RACE ETHNIC COUNTRY DTHFL
#> <chr> <chr> <chr> <chr> <int> <fct> <fct> <fct> <fct> <fct> <fct>
#> 1 AB12345 AB12345-C… id-199 CHN-11 33 YEARS F BLAC… NOT H… CHN N
#> 2 AB12345 AB12345-C… id-146 CHN-14 27 YEARS M BLAC… NOT H… CHN N
#> 3 AB12345 AB12345-C… id-179 CHN-12 40 YEARS M UNKN… NOT H… CHN N
#> 4 AB12345 AB12345-U… id-42 USA-1 29 YEARS F ASIAN NOT H… USA N
#> 5 AB12345 AB12345-C… id-87 CAN-1 30 YEARS M BLAC… NOT H… CAN N
#> 6 AB12345 AB12345-J… id-353 JPN-11 33 YEARS M ASIAN NOT H… JPN N
#> 7 AB12345 AB12345-B… id-315 BRA-12 36 YEARS M ASIAN NOT H… BRA Y
#> 8 AB12345 AB12345-U… id-299 USA-11 56 YEARS F AMER… NOT H… USA N
#> 9 AB12345 AB12345-J… id-80 JPN-12 29 YEARS F ASIAN NOT H… JPN N
#> 10 AB12345 AB12345-C… id-131 CHN-6 36 YEARS F BLAC… NOT H… CHN N
#> # ℹ 390 more rows
#> # ℹ 44 more variables: INVID <chr>, INVNAM <chr>, ARM <fct>, ARMCD <fct>,
#> # ACTARM <fct>, ACTARMCD <fct>, TRT01P <fct>, TRT01A <fct>, TRT02P <fct>,
#> # TRT02A <fct>, REGION1 <fct>, STRATA1 <fct>, STRATA2 <fct>, BMRKR1 <dbl>,
#> # BMRKR2 <fct>, ITTFL <fct>, SAFFL <fct>, BMEASIFL <fct>, BEP01FL <fct>,
#> # AEWITHFL <fct>, RANDDT <date>, TRTSDTM <dttm>, TRTEDTM <dttm>,
#> # TRT01SDTM <dttm>, TRT01EDTM <dttm>, TRT02SDTM <dttm>, TRT02EDTM <dttm>, …