[R] Nested brew call yields Error in .brew.cat(26, 28) : unused argument(s) (26, 28)

Chris Beeley chris.beeley at gmail.com
Wed Mar 28 12:40:09 CEST 2012


I am writing several webpages using the brew package and R2HTML. I would 
like to work off one script so I am using nested brew calls. The 
documentation for brew states that:

"NOTE: brew calls can be nested and rely on placing a function named 
’.brew.cat’ in the environment in which it is passed. Each time brew is 
called, a check for the existence of this function is made. If it 
exists, then it is replaced with a new copy that is lexically scoped to 
the current brew frame. Once the brew call is done, the function is 
replaced with the previous function. The function is finally removed from 
the environment once all brew calls return."

I'm afraid I can't quite figure out what it is I'm supposed to do here. 
I've tried loading the brew library within the script which I pass to 
brew, and I've tried defining brew cat like this:

.brew.cat=function(){}

This generates the following error message:

Error in .brew.cat(26, 28) : unused argument(s) (26, 28)

I think perhaps it is more likely that I need to insert into the script 
the actual content of .brew.cat, but I can't seem to get R to tell me 
what it is and Googling throws up a lot of stuff about beer and not much 
else (drew a blank also from RSiteSearch("Nested brew"))

Any help gratefully received.

Chris Beeley
Institute of Mental Health, UK



More information about the R-help mailing list