https://github.com/cran/SoDA
Revision e3fb24ebd97f7686caee78bcef4e558b908a465e authored by jmc on 01 December 2007, 00:00:00 UTC, committed by Gabor Csardi on 01 December 2007, 00:00:00 UTC
1 parent 1c016a1
Tip revision: e3fb24ebd97f7686caee78bcef4e558b908a465e authored by jmc on 01 December 2007, 00:00:00 UTC
version 0.97-1
version 0.97-1
Tip revision: e3fb24e
dropFormula.R
dropFormula <- function(original, drop) {
factors <- attr(terms(as.formula(original)),
"factors")
row <- match(drop, rownames(factors))
whichTerms <- factors[row,] == 1
labels <- colnames(factors)[whichTerms]
text <- paste("~ . ",
paste("-", labels, collapse = " "))
eval(parse(text = text))
}
Computing file changes ...