[BioC] .Rnw file

Seth Falcon sfalcon at fhcrc.org
Wed Jan 3 20:35:50 CET 2007


Hi Lana,

Rnw files, also called Sweave documents, consist of chunks of LaTeX
markup and chunks of R code.  Sweave documents can be processed using
R's Sweave() function to generate a latex file where the R code chunks
have been computed.  The resulting tex file can then be transformed
into a human readable form, such as PDF.  So a common workflow is:

  Sweave("something.Rnw")
  # quit R
  pdflatex something.tex
  # open something.pdf

Another useful thing to do with Rnw files is to extract _only_ the R
code.  This can be achieved using Rtangle().  The result is an R file
containing only the code chunks.


"Lana Schaffer" <schaffer at scripps.edu> writes:
> Steffen,
>> Sweave("assessNorm.Rnw")
>> Sweave("assessNorm.Rnw")
> Writing to file assessNorm.tex
> Processing code chunks ...
>  1 : echo term hide (label=load)
>  2 : term verbatim (label=errorReporting)
>  3 : echo term verbatim (label=showDavidTilingData)
>  4 : echo term verbatim (label=probeAnno)
>  5 : echo term verbatim (label=whPM)
>  6 : echo term verbatim (label=table)
>  7 : echo term verbatim (label=selectArrays)
>  8 : echo term verbatim (label=normalizeByReference)
>
> Error:  chunk 8 (label=normalizeByReference)
> Error in vsn(xn, lts.quantile = 0.95, subsample = 2e+05, verbose =
> verbose) 

So it looks like the R code in the vignette you are building is
raising an error.  It might be easier to debug by generating the R
files using Rtangle and then stepping through the resulting R code.

+ seth



More information about the Bioconductor mailing list