Title Prepare the data for the UFT_Func. Mainly, it converts factor and character type data to integer format.

Prepare_data(categorical_data)

Arguments

categorical_data

is the original categorical data that the UFT_Func will transform to become numerical. It should be of data frame format.

Value

a data frame with all the data are of int type.

Examples

X <- data.frame("ID" = 1:4, "Sex" = c("Male", "Male", "Female", "Female" ), "Name" = c("John","Samer", "Sara", "Carolina"), Smoking = c("Yes","No", "No","Yes")) Prepare_data(X)
#> ID Sex Name Smoking #> 1 1 2 2 2 #> 2 2 2 3 1 #> 3 3 1 4 1 #> 4 4 1 1 2