data(BrookTrout)
# Example with median as cutoff
med_df <- dtize_df(
BrookTrout,
cutoff="median",
labels=c("below median", "above median")
)
# Example with mean as cutoff
mean_df <- dtize_df(
BrookTrout,
cutoff="mean",
include_right=FALSE
)
# Example with missing value imputation
air <- dtize_df(
airquality,
cutoff="mean",
na_fill="pmm",
m=10,
maxit=10,
seed=42
)
Run the code above in your browser using DataLab