#Default
heart_disease %>%
descriptives()
#Allow logicals as categorical
heart_disease %>%
descriptives(
categorical_types = c("logical", "factor")
) %>%
#Extract info from the column
dplyr::filter(
col_lab == "BloodSugar"
)
#Nothing treated as numeric
heart_disease %>%
descriptives(
numeric_types = NULL
)
#Evaluate a custom function
heart_disease %>%
descriptives(
f_numeric =
list(
cv = function(x) sd(x, na.rm = TRUE)/mean(x, na.rm = TRUE)
)
) %>%
#Extract info from the custom function
dplyr::filter(
fun_key == "cv"
)
Run the code above in your browser using DataLab