Displaying 1 result from an estimated 1 matches for "dfun3".
Did you mean:
fun3
2011 Apr 18
2
help with eval()
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 in model.frame.lm is:
env <- environment(formula$terms)
if (is.null(env))
env <-...