View source: R/ensure_factor.R
ensure_factor | R Documentation |
Ensure that factor variables in data set are of the correct type.
ensure_factor(data, execute = FALSE, threshold_factor = 5)
data |
A data frame. |
execute |
Bool, default |
threshold_factor |
An integer, default |
A list containing data frame and description.
## Load Mayo Clinic Primary Biliary Cirrhosis Data library(survival) library(tableeasy) data(pbc) ## Check variables head(pbc) ## ensure_factor(pbc) ensure_factor(pbc,execute=TRUE)[['message']] pbc_exe <- ensure_factor(pbc,execute=TRUE)[['data']]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.