You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was making an update regarding variables with bad names (i.e. spaces, etc), and I noticed a small issue with the variable label. When a variable has a space in it, the variable label is correctly populated in the var_label column, but is not populated in the "label" column.
library(broom.helpers)
library(gtsummary)
#> #BlackLivesMatter
packageVersion("broom.helpers")
#> [1] '1.1.0'# 'label' column does not have variable label
lm(response~`age at dx`,
data=trial %>% select(response, `age at dx`=age)) %>%
tidy_plus_plus(
variable_labels=list(`age at dx`="AGGGGGGGE")
) %>%
select(term, variable, var_label, label, estimate)
#> # A tibble: 1 x 5#> term variable var_label label estimate#> <chr> <chr> <chr> <chr> <dbl>#> 1 `age at dx` age at dx AGGGGGGGE `age at dx` 0.00402# 'label' column is correct with normal name
lm(response~age,
data=trial) %>%
tidy_plus_plus(
variable_labels=list(age="AGGGGGGGE")
) %>%
select(term, variable, var_label, label, estimate)
#> # A tibble: 1 x 5#> term variable var_label label estimate#> <chr> <chr> <chr> <chr> <dbl>#> 1 age age AGGGGGGGE AGGGGGGGE 0.00402
some weird things with backtips. Should be fixed now:
library(broom.helpers)
library(gtsummary)
#> #BlackLivesMatter#> #> Attachement du package : 'gtsummary'#> The following objects are masked from 'package:broom.helpers':#> #> all_categorical, all_continuous, all_dichotomous
packageVersion("broom.helpers")
#> [1] '1.1.0.9000'
lm(response~`age at dx`+`drug type`,
data=trial %>% select(response, `age at dx`=age, `drug type`=trt)) %>%
tidy_plus_plus(
variable_labels=list(`age at dx`="AGGGGGGGE")
) %>%
select(term, variable, var_label, label, estimate)
#> # A tibble: 3 x 5#> term variable var_label label estimate#> <chr> <chr> <chr> <chr> <dbl>#> 1 `age at dx` age at dx AGGGGGGGE AGGGGGGGE 0.00402#> 2 `drug type`Drug A drug type Chemotherapy Treatment Drug A 0 #> 3 `drug type`Drug B drug type Chemotherapy Treatment Drug B 0.0265
lm(response~age,
data=trial) %>%
tidy_plus_plus(
variable_labels=list(age="AGGGGGGGE")
) %>%
select(term, variable, var_label, label, estimate)
#> # A tibble: 1 x 5#> term variable var_label label estimate#> <chr> <chr> <chr> <chr> <dbl>#> 1 age age AGGGGGGGE AGGGGGGGE 0.00402
Hey @larmarange !
I was making an update regarding variables with bad names (i.e. spaces, etc), and I noticed a small issue with the variable label. When a variable has a space in it, the variable label is correctly populated in the
var_label
column, but is not populated in the"label"
column.Created on 2020-12-03 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: