Deploying to gh-pages from @ agdamsbo/FreesearchR@54dd332cd8 🚀

This commit is contained in:
agdamsbo 2025-11-19 13:25:44 +00:00
commit 6d545337de
328 changed files with 12930 additions and 1662 deletions

40
reference/get_label.md Normal file
View file

@ -0,0 +1,40 @@
# Print label, and if missing print variable name
Print label, and if missing print variable name
## Usage
``` r
get_label(data, var = NULL)
```
## Arguments
- data:
vector or data frame
- var:
variable name. Optional.
## Value
character string
## Examples
``` r
mtcars |> get_label(var = "mpg")
#> [1] "mpg"
mtcars |> get_label()
#> [1] "mtcars"
mtcars$mpg |> get_label()
#> [1] "mtcars$mpg"
gtsummary::trial |> get_label(var = "trt")
#> [1] "Chemotherapy Treatment"
gtsummary::trial$trt |> get_label()
#> [1] "Chemotherapy Treatment"
1:10 |> get_label()
#> [1] "1:10"
```