Displaying 1 result from an estimated 1 matches for "mydatf".
Did you mean:
mydata
2011 Aug 02
1
update.default: fall back on model.frame in case that the data frame is not in the parent environment
Dear all,
Suppose the following code:
--------------8<--------------
mm <- function(datf) {
lm(y ~ x, data = datf)
}
mydatf <- data.frame(x = rep(1:2, 10), y = rnorm(20, rep(1:2, 10)))
l <- mm(mydatf)
-------------->8--------------
If I want to update l now without providing the data argument an error
occurs:
--------------8<--------------
> update(l, . ~ .)
Error in inherits(x, "data.frame")...