Hello Ho can I apply a formula to a data frame?
library("formula.tools") Data <- data.frame("v1" = rnorm(31), "v2" = runif(31), "v3" = sample(1:7, 31, repl=T), "v4" = rlnorm(31)) For1 <- as.formula(v1 ~ .^3) Lhs <- Data[, formula.tools::lhs.vars(formula)] Rhs <- apply_formula_to_data_frame_and_return_result(data, formula) # ??? Thank you, Sören ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.