ff_mode | R Documentation |
When producing conditional estimates from a regression model, it is often useful to set variables not of interest to their mode when creating the newdata object.
ff_mode(...)
finalfit_mode(...)
... |
Unquoted factor names. |
The most frequent level in a factor.
summary_df
ff_expand
library(dplyr)
colon_s %>%
summarise(age.factor = ff_mode(age.factor))
colon_s %>%
select(sex.factor, rx.factor, obstruct.factor, perfor.factor) %>%
summarise(across(everything(), ff_mode))
colon_s %>%
reframe(across(where(is.factor), ff_mode))
# Note, 4 rows is returned in this example because 4 factor levels within `hospital`
# have the same frequency.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.