[ESS] '$' sign in R code

Sven Hartenstein lists at svenhartenstein.de
Mon Sep 13 20:14:37 CEST 2010


Dear Tengfei,

> 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?

This has been discussed before. See this thread:
https://stat.ethz.ch/pipermail/ess-help/2009-November/thread.html#5679

What I do is thus:

  df[df[["X_STATE"]]==6,'X_STATE'] <- 'CA'

Best,

Sven



More information about the ESS-help mailing list