[ESS] ESS in brew syntax files
cberry at tajo.ucsd.edu
cberry at tajo.ucsd.edu
Sat Sep 10 06:45:29 CEST 2011
Michael Hannon <jm_hannon at yahoo.com> writes:
> Hi, Sven. Have you considered using the Babel feature of Emacs Org-Mode?
>
> http://orgmode.org/worg/org-contrib/babel/intro.html
>
> -- Mike
Mike,
FWIW, I use something like this:
* Example
#+results: sample2
#+begin_src latex :eval never :exports none
Start with three letters: <%=sample(letters,3)%>,
Then go for three numbers: <%=sample(0:9,3)%>.
#+end_src
#+begin_src R :var txt=sample2 :results output org :exports results
require(brew)
brew( text=sub( "\n[ ]+", "\n", txt) )
#+end_src
Then I can edit the brew script in AucTeX-mode and export to ascii or
latex or whatever.
But maybe there is a slicker way to do this.
??
Chuck
>
>
>
>
>>________________________________
>>From: Sven Hartenstein <lists at svenhartenstein.de>
>>To: ess-help at r-project.org
>>Sent: Thursday, September 8, 2011 9:52 AM
>>Subject: [ESS] ESS in brew syntax files
>>
>>Dear ESScians,
>>
>>I am looking for a way to use ESS in files containing brew template
>>syntax. So, to have ESS mode in the R code chunks, like in Sweave
>>files with Rnw-mode. For those of you who do not know brew template
>>syntax yet, I attach an example below.
>>
>>Has anyone experience, ideas, or hints?
>>
>>Sven
>>
>>
>>=== example brew template syntax file content ===
>>
>><p>This is <b>some HTML</b>.</p>
>><h2>And another line of HTML</h2>
>><%
>># This is R code
>>x <- rnorm(5)
>>y <- paste(1:5)
>>z <- x*y
>>%>
>>The largest number is <%= max(x) %>.<br />
>>More HTML here.<br />
>>That is it.
>>
>>______________________________________________
>>ESS-help at r-project.org mailing list
>>https://stat.ethz.ch/mailman/listinfo/ess-help
>>
>>
>>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
--
Charles C. Berry
UC San Diego
More information about the ESS-help
mailing list