The R2WinBUGS package has a function called write.model()
. The R package rjags has no such function of which I am aware. write.model
creates a temporary text file that can be read as a model by WinBUGS.
I know I can enter write.model
into the console to see the function, but this function seems to make calls to function that I've never seen before, and can't search for in help()
(e.g., replaceScientificNotationR
is apparently a function).
I saw This Post that describes some methods for doing this, but if possible, I'd prefer to not have to use the quotes (just to maintain my syntax highlighting), and a comment suggested that "copying the write.model function" should be doable.
Has anyone done this?