[ESS] how to edit openbugs model file?

Paul Johnson p@u|john32 @end|ng |rom gm@||@com
Mon Dec 5 20:17:01 CET 2016

Thanks, everybody.  I'm taking the suggestion Martin offered, since
this thing is required to be named *.txt in the current OpenBUGS.


Put this at the end of the *.txt file:

# Local Variables:
# mode: R
# End:

That works.

This question was raised by an interesting problem. This might be a
useful a warning to others using Emacs and OpenBugs.  Punch line:
character encoding must be ASCII.

The student typed in a bugs model file on his system, using Emacs.
The default character encoding was set as UTF8. Then his model files
kept crashing OpenBugs and I could not understand why. It warned about
unfamiliar characters,  I kept checking to see that file encoding was

Doh! Then I remembered that OpenBUGS asks for ASCII files!  Symbols
like "*" and "~" are given different encoding in ASCII and UTF8. The
"~" looks exactly the same, whether ASCII or UTF8, but luckily for us,
that student's computer showed the UTF8 "*" as a highlighted character
that was in a different line position.

If you put the cursor on a character and run C-u C-x =, then you see a
nice display about the encoding. There's an especially helpful post
about it:

>From within Emacs, I cannot replicate that problem that the student
generated. No matter how I set buffer-file-encoding-system, I get
ASCII whenever I type "*" or "~". I'm guessing that because the
student is from another country, and English is not his native
language, that his Locale is different somehow.  But I can't see
what's different about it. Interesting and frustrating!


On Sat, Dec 3, 2016 at 8:40 AM, Sparapani, Rodney <rsparapa using mcw.edu> wrote:
> Hi Paul:
> Use BUGS mode which is part of ESS…
> (require ‘ess-bugs-d)
> Then name your file model.bug
> Rodney
> ______________________________________________
> ESS-help using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help

Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

To write to me directly, please address me at pauljohn at ku.edu.

More information about the ESS-help mailing list