search for: beets2

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

2012 Sep 17
2
"eval" inside a function call in connection with updating the data slot in the call of lmer
...Given a linear mixed model (from lme4) I want to 1) first change the input dataset and then 2) change the model formula. I want this to happen in a function call; Please see below. Options 1) and 2) below work whereas 3) fails with the message > 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)...