> -------- Original Message -------- > Subject: Re: [R] How to extract R codes that embedded in a HTML file > using Stangle? > Date: Thu, 17 May 2007 17:01:30 +0000 > From: Tao Shi <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED], [EMAIL PROTECTED] > CC: r-help@stat.math.ethz.ch
> : <[EMAIL PROTECTED]> > Hi Uwe, > Thanks for the answer, but I still need a bit more clearification. I > always > thought that a .rnw or .snw file is a file mixing word processing markup > (e.g. tex or HTML) and R/S code using noweb syntax. Is the reason for > 'Stangle' is not working with .rnw file with HTML due to there is no proper > driver available (like RweaveHTML driver for Sweave)? If yes, does R2HTML > package have plans to provide a such driver? > ....Tao The following does the trick for me: R> mytangle <- function () list(setup = RtangleSetup, runcode = utils:::RtangleRuncode, writedoc = RtangleWritedoc, finish = utils:::RtangleFinish, checkopts = RweaveHTMLOptions) R> Stangle("/PATH/TO/R/SITE-LIBRARY/R2HTML/samples/example1.snw", driver=mytangle) Writing to file example1.R Best, Fritz ______________________________________________ R-help@stat.math.ethz.ch 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.