# NOT RUN {
dat <- data.frame(sapply(1:5, function(z) rnorm(100)))
ord_dat <- ordinalize(dat)
# Including a moderator, without converting the moderator into an ordinal variable
ord_dat <- ordinalize(dat, m = 5, mord = FALSE)
colnames(dat)[5] <- 'M'
ord_dat <- ordinalize(dat, m = 'M', mord = FALSE)
# Use thresholds to break each variable into quartiles
thresh <- lapply(dat, function(z) quantile(z, probs = c(.25, .5, .75)))
ord_dat <- ordinalize(dat, thresholds = thresh)
# }
Run the code above in your browser using DataLab