[ESS] '$' sign in R code

Brian Diggs diggsb at ohsu.edu
Tue Sep 14 19:33:49 CEST 2010


On 9/13/2010 10:36 AM, Tengfei Yin wrote:
> Hi dear all,
>
> In a R code chunk, when I use data frame 's $ accessor to subset it,  I have
> to put another $ in the comment, or the latex will treated as math mode?
>
>
> df[df$X_STATE==6,'X_STATE']<- 'CA'  # $
>
>
> My system:
>
> Ubuntu 10.04 64 bit, emacs 23.1.1, ess 5.11-1
>
> Thanks
>
> Tengfei

Tengfei,

I had that problem too, and then I discovered noweb-font-lock-mode which 
fixed it.  I just added:

; font-lock for noweb
(require 'noweb-font-lock-mode)

to my init.el file.

-- 
Brian S. Diggs, PhD
Senior Research Associate, Department of Surgery
Oregon Health & Science University



More information about the ESS-help mailing list