On Wed, Feb 11, 2009 at 2:15 PM, baptiste auguie <ba...@exeter.ac.uk> wrote:
> A somewhat twisted approach that has not been mentioned is to consider
> everything a comment unless it is enclosed in special tags, as done in the
> brew package,
>
> for example,
>
>
>>  brew(textConnection(
>> "You won't see this R output, but it will run. <% foo <- 'bar' %>
>>  Now foo is <%=foo%> and today is <%=format(Sys.time(),'%B %d, %Y')%>."
>>  ) )
>
> gives,
>
>> You won't see this R output, but it will run.
>> Now foo is bar and today is February 11, 2009.
>
>
> I'd love to see an editor with a "brew" mode that acts as a notebook: you
> type in your text in whatever language without worrying about the syntax (R
> syntax, i mean!), and when you want to do a calculation you just enclose it
> in such tags that behave like an inverted block comment.
>
> Just a thought,
>
> baptiste
>


Isn't this almost exactly what ?Sweave does? (and  odfWeave).
Granted, you have to deal with latex code to get nice output, but
latex is a GoodThing (tm).

/Gustaf

-- 
Gustaf Rydevik, M.Sci.
tel: +46(0)703 051 451
address:Essingetorget 40,112 66 Stockholm, SE
skype:gustaf_rydevik

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to