Re: [Rd] help with eval()

2011-04-19 Thread peter dalgaard
On Apr 19, 2011, at 07:16 , Prof Brian Ripley wrote: > On Mon, 18 Apr 2011, Duncan Murdoch wrote: > >> On 11-04-18 5:51 PM, Terry Therneau wrote: >>> I've narrowed my scope problems with predict.coxph further. >>> Here is a condensed example: >>> fcall3<- as.formula("time ~ age") >>> dfun3<- fun

Re: [Rd] help with eval()

2011-04-18 Thread Prof Brian Ripley
On Mon, 18 Apr 2011, Duncan Murdoch wrote: On 11-04-18 5:51 PM, Terry Therneau wrote: I've narrowed my scope problems with predict.coxph further. Here is a condensed example: fcall3<- as.formula("time ~ age") dfun3<- function(dcall) { fit<- lm(dcall, data=lung, model=FALSE) model.fra

Re: [Rd] help with eval()

2011-04-18 Thread Gabor Grothendieck
On Mon, Apr 18, 2011 at 5:51 PM, Terry Therneau wrote: > I've narrowed my scope problems with predict.coxph further. > Here is a condensed example: > > fcall3 <- as.formula("time ~ age") > dfun3 <- function(dcall) { >    fit <- lm(dcall, data=lung, model=FALSE) >    model.frame(fit) > } > dfun3(fc

Re: [Rd] help with eval()

2011-04-18 Thread Duncan Murdoch
On 11-04-18 5:51 PM, Terry Therneau wrote: I've narrowed my scope problems with predict.coxph further. Here is a condensed example: fcall3<- as.formula("time ~ age") dfun3<- function(dcall) { fit<- lm(dcall, data=lung, model=FALSE) model.frame(fit) } dfun3(fcall3) The final call fails

[Rd] help with eval()

2011-04-18 Thread Terry Therneau
I've narrowed my scope problems with predict.coxph further. Here is a condensed example: fcall3 <- as.formula("time ~ age") dfun3 <- function(dcall) { fit <- lm(dcall, data=lung, model=FALSE) model.frame(fit) } dfun3(fcall3) The final call fails: it can't find 'dcall'. The relevant code