Re: [R] Using xlevels

2011-03-30 Thread William Dunlap
the default stringsAsFactors=TRUE can cause problems. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Terry Therneau > Sent: Wednesday, March 30, 2011 10:29

Re: [R] Using xlevels

2011-03-30 Thread Terry Therneau
I see the logic now. I think that more sentences in the document would be very helpful, however. What is written is very subtle. I suggest the following small expansion for model.matrix.Rd: \item{data}{a data frame. If the object has a \code{terms} attribute then it is assumed to be the resul

Re: [R] Using xlevels

2011-03-30 Thread Prof Brian Ripley
On Wed, 30 Mar 2011, Terry Therneau wrote: I'm working on predict.survreg and am confused about xlevels. The model.frame method has the argument, but none of the standard methods (model.frame.lm, model.frame.glm) appear to make use of it. But I see this in predict.lm: m <- model.frame

[R] Using xlevels

2011-03-30 Thread Terry Therneau
I'm working on predict.survreg and am confused about xlevels. The model.frame method has the argument, but none of the standard methods (model.frame.lm, model.frame.glm) appear to make use of it. The documentation for model.matrix states: xlev: to be used as argument of model.frame if data has n