search for: sugpct

Displaying 1 result from an estimated 1 matches for "sugpct".

Did you mean: sugest
2012 Sep 17
2
"eval" inside a function call in connection with updating the data slot in the call of lmer
...e > foo() Error in is.data.frame(data) : object 'beets2' not found Question: What is it one must to in case 3) to have R look "inside" the function to figure out what "beets2" is? Best regards S?ren ________________ library(pbkrtest) data(beets) lgs <- lmer(sugpct~block+sow+harvest+(1|block:harvest), data=beets, REML=F) foo <- function(){ ## 1) beets2 <- transform(beets, yy = sugpct * yield) ma1 <- lmer(yy~block+sow+harvest+(1|block:harvest), data=beets2, REML=F) ma0 <- update(ma1, yy~.) ## 2) cl <- getCall(lgs) cl[["data&qu...