Revision 9e5b9bb8a0564f8bf629df4ca5e96d3078f50363 authored by jmc on 14 July 2008, 00:00:00 UTC, committed by Gabor Csardi on 14 July 2008, 00:00:00 UTC
1 parent a3b36b1
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 ...