Re: [R] abbreviating words in a model formula

2013-07-08 Thread William Dunlap
gt; From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of William Dunlap > Sent: Monday, July 08, 2013 11:02 AM > To: Michael Friendly; R-help > Subject: Re: [R] abbreviating words in a model formula > > Try using all.names() to get all the nam

Re: [R] abbreviating words in a model formula

2013-07-08 Thread Jeff Newmiller
Your cart is stuck in front of your horse. This will be WAY easier to accomplish if you rename your columns in your input data frame before fitting the model. --- Jeff NewmillerThe .

Re: [R] abbreviating words in a model formula

2013-07-08 Thread William Dunlap
Try using all.names() to get all the names in the formula. E.g., f <- function (formula, minNameLength = 2, abbreviateFunctionNames = FALSE) { names <- all.names(formula, functions = abbreviateFunctionNames) abbrNames <- lapply(abbreviate(names, minlength = minNameLength), as.name