Short answer, nothing!
This was a couple of confusions on my part.
One was the R idiom where you don't want to set
a default parameter value other than NULL,
because you may pass data in other ways. Defaults
get confusing when there are optional arguments
that control settings (sort of like for Stan itself's
command-line control of HMC vs. NUTS through interacting
arguments).
My second confusion was about global environments.
I should've replaced ".GlobalEnv or whatever" with
"environment() or whatever". (I only remembered the
.GlobalEnv from something in the mi interface.)
Sorry -- this is just MY lack of fluency in R.
We absolutely don't want to document the R language
as part of our own doc.
Examples of using the idioms should go in a tutorial
user's guide. I wouldn't mind taking a whack at writing
that to force myself to learn R better.
- Bob