R-list -- I am working with some SPlus code and get the following error Error in terms.default(formula, data = data) : no terms component Can someone point me to a fix? The pasted formula looks ok when printed during the procedure. Thanks, Dan =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-Daniel A. Powers, Ph.D. Associate Professor of Sociology University of Texas at Austin 370 Burdine Austin, TX 78712 phone: 512-232-6335 fax: 512-471-1748 dpowers at mail.la.utexas.edu
R and S-PLUS handle terms very differently. If this were a formula, terms would dispatch to term.formula, so presumably it is not. Do you need an as.formula() call? On Thu, 6 Mar 2003, Daniel A. Powers wrote:> I am working with some SPlus code and get the following error > > Error in terms.default(formula, data = data) : > no terms component > > Can someone point me to a fix? The pasted formula looks ok > when printed during the procedure.You need to read carefully how terms() works in R, from the help page and from examples in the sources. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Daniel A. Powers wrote:> R-list -- > > I am working with some SPlus code and get the following error > > Error in terms.default(formula, data = data) : > no terms component > > Can someone point me to a fix? The pasted formula looks ok > when printed during the procedure.Without a more detailed description it's hard to say what's wrong. It looks a little like the terms.default method has been called directly rather than via the generic terms function. This is generally a bad idea. -- Ross Ihaka Email: ihaka at stat.auckland.ac.nz Department of Statistics Phone: (64-9) 373-7599 x 85054 University of Auckland Fax: (64-9) 373-7018 Private Bag 92019, Auckland New Zealand