Andrew Thomas confirmed that the "error pos" number does indeed refer
to the character number from the start of the file that the error
occurs at. In the next release of OpenBUGS (and hence BRugs), he hopes
to try and give the line position as well.
Adam Butler pointed out that the emacs editor has a "goto buffer
position" facility, so changing the text editor I use would be an
answer. However, he also wished that OpenBUGS gave line positions of
I'm sure Andrew already has a long list of "nice to have" additions to
the program - just being able to use BUGS in R is really smart. I
don't wish to be unappreciative of the considerable ongoing efforts of
the Bugs team.
Finally, Gregor Gorjanc drew my attention to the "nchar" command in R,
which counts characters in vectors of strings.
Thanks to everyone who responded.
On 4/10/06, Dominic Muston <[log in to unmask]> wrote:
> Dear BugsList,
> Here's a basic question about using Bugs in R on Windows using the
> package BRugs ...
> On compiling the model, initital conditions or data using the
> modelCheck, modelData, modelCompile and modelInits commands, I often
> get a message in R saying something like
> "expected variable name error pos 71".
> My concern is not how to resolve the (probably trivial) error, but
> rather where to find where the error has occurred. What does "error
> pos 71" mean?
> I don't think it means "line number". Perhaps it means "character
> number", eg the 71st character in the text file referred to in the R
> command? The character number is less useful to me than the line
> number because my text editor (Crimson Editor) won't tell me where
> character 71 is! Running the model in WinBugs would resolve this
> problem because the cursor moves to where the error is found, but I'd
> like to move to doing everything in R.
> Answers / suggestions gratefully received. Sorry if this is already
> well answered elsewhere - I looked but didn't find anything before
> posting. Thank you,
> Dominic Muston
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list