[R] brew equivalent of "R CMD Sweave"

Duncan Murdoch murdoch.duncan at gmail.com
Sat Aug 7 00:46:55 CEST 2010


On 06/08/2010 5:23 PM, Liviu Andronic wrote:
> Dear all
> Is there an equivalent of "R CMD Sweave" for brew [1] documents?
> Something in the lines of "R CMD brew"? Can R be configured to parse
> brew documents from the commandline, without opening an interactive R
> session and issuing the following? 
> require(brew)
> brew("featurefull.brew")

You can run a single R command from the command line using the -e option, so

R -e "brew::brew('featurefull.brew')"

(or some variation on that, depending on how your shell handles quotes) 
will run that one command.  Use R --help to see other options, e.g. to 
suppress the banner, etc.

It shouldn't be too hard to work out how to construct that line from 
your favourite shell scripting language, so

brew featurefull.brew

would execute it.

Duncan Murdoch

> 
> I would like to set a LyX converter for brew documents, and for this
> I'd need to call the brew parser from the cli. Please let me know of
> any ideas. 
> 
> Regards
> Liviu
> 
> [1] http://cran.r-project.org/web/packages/brew/index.html
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list