Closed trinker closed 6 years ago
It's be nice to apply a function across count columns to normalize etc. Proposed ish structure:
mutate_termco <- function(model, fun = function(x) as.integer(x > 0)){ model2 <- model %>% mutate_at(vars(on_campus:housing_general), fun) attributes(model2) <- attributes(model) class(model2) <- class(model) model <- model2 model }
This retains the termco class/attributes but allows for different apply all count columns some normalizing function.
It's be nice to apply a function across count columns to normalize etc. Proposed ish structure:
This retains the termco class/attributes but allows for different apply all count columns some normalizing function.