data(BrookTrout)
# Example with predefined cutoffs
discrete_water_temp <- dtize_col(
BrookTrout$eDNAConc, cutoff=13.3,
labels=c("low", "high"),
infinity=TRUE
)
# Example with median as cutoff
discrete_pH <- dtize_col(BrookTrout$pH, cutoff="median")
# Example with missing value imputation
filled_col <- dtize_col(
c(1, 2, NA, 4, 5),
cutoff = "mean",
include_right=FALSE,
na_fill = "mean"
)
Run the code above in your browser using DataLab