Include only percentages for factors in summary_factorlist output

ff_percent_only(.data)

finalfit_percent_only(.data)

Arguments

.data

Output from finalfit or similar.

Value

Data frame.

Examples

explanatory = c("age.factor", "sex.factor", "obstruct.factor", "perfor.factor")
dependent = 'mort_5yr'
colon_s %>%
  summary_factorlist(dependent, explanatory) %>%
  ff_percent_only()
#> Note: dependent includes missing data. These are dropped.
#> Warning: Unknown columns: `p`
#>        label      levels Alive Died
#>          Age   <40 years   6.1  8.9
#>              40-59 years  40.7 32.4
#>                60+ years  53.2 58.7
#>          Sex      Female  47.6 48.0
#>                     Male  52.4 52.0
#>  Obstruction          No  82.1 78.6
#>                      Yes  17.9 21.4
#>  Perforation          No  97.3 96.8
#>                      Yes   2.7  3.2