[R] Entering Multiline Commands With ESS

Marc Schwartz marc_schwartz at me.com
Wed Aug 31 19:47:48 CEST 2011


On Aug 31, 2011, at 12:42 PM, Rich Shepard wrote:

>  If there's a separate ESS user mail list, please point me to it.

https://stat.ethz.ch/mailman/listinfo/ess-help

>  I'm using emacs with ESS and want to enter multiline commands for plots.
> Examples in my reference books show each line terminating with a comma so
> labels and other attributes can be specified for the plot before it is
> submitted for rendering. When I try to do this, however, I get an error:
> 
>> boxplot(chemdata$quant ~ chemdata$param),
> Error: unexpected ',' in "boxplot(chemdata$quant ~ chemdata$param),"
> 

If you C&P'd exactly as you typed it, you have a ',' after the closing paren for the boxplot() function call, so the issue is a typo, not an ESS problem.

Presumably, you might want:

  boxplot(chemdata$quant ~ chemdata$param, 

with additional input on another line. Or better yet:

  boxplot(quant ~ param, data = chemdata, …

to take advantage of the formula method for boxplot().

HTH,

Marc Schwartz

>  Please explain how I enter these commands.
> 
> Rich



More information about the R-help mailing list