[Bioc-devel] R source code files of package vignettes

Florian Hahne fhahne at fhcrc.org
Tue Jul 28 22:43:31 CEST 2009


Hi Joern,
take a look at the cellHTS2 package where I use Herve's suggestion for  
the cellHTS2Complete vignette. The only slight nuisance here is that  
all the code chunks in the .R file will be commented out...
Also this section of the writing extensions manual might be  
enlightening:

By default R CMD build will run Sweave on all files in Sweave format.  
If no Makefile is found in directory inst/doc, then texi2dvi --pdf is  
run on all vignettes. Whenever a Makefile is found, then R CMD build  
will try to run make after the Sweave step, so PDF manuals can be  
created from arbitrary source formats (plain LaTeX files, ...). The  
first target in the Makefile should take care of both creation of PDF  
files and cleaning up afterwards, i.e., delete all files that shall  
not appear in the final package archive. Note that the make step is  
executed independently from the presence of any files in Sweave format.

As far as I remember, Stangle is called before the Makefile is executed
Florian



On 28.07.2009, at 10:27, Hervé Pagès wrote:

> Hi Joern,
>
> One possible workaround would be to replace the dummy Rnw file by a
> version of the true vignette where all the code chunks are tagged
> with eval=FALSE. Then you would need to keep in sync 2 versions of the
> same file: the eval=TRUE and the eval=FALSE versions. But that can
> easily be achieved on Unix with a 2 line shell script using the sed
> command.
>
> Cheers,
> H.
>
> Joern Toedling wrote:
>> Dear all,
>> I would welcome your feedback on a small problem regarding vignettes.
>> For the data package ccTutorial, I pre-build the vignettes on my  
>> machine, as
>> building these vignettes takes considerable time. The folder 'inst/ 
>> doc' only
>> contains dummy versions of the two vignettes and a Makefile which  
>> copies the
>> pre-built vignettes from another directory into 'doc' after running  
>> Sweave on
>> the dummy files.
>> I would also like to provide the source code of the pre-built  
>> vignettes
>> in the doc directory (as these are also linked on the BioC package  
>> web page).
>> However, having the *R files copied from the other directory into  
>> doc via use
>> of the Makefile is pointless as it seems that the command Stangle  
>> is run on
>> the dummy vignettes afterwards. So the source code files in the  
>> directory
>> 'doc' only contain the non-relevant source code of the dummy files.  
>> Do you
>> know of a way to avoid having Stangle run on the dummy files? Or is  
>> there
>> another way to copy files afterwards?
>> Cheers,
>> Joern
>> ---
>> Joern Toedling
>> Institut Curie -- U900
>> 26 rue d'Ulm, 75005 Paris, FRANCE
>> Tel. +33 (0)156246926
>> _______________________________________________
>> Bioc-devel at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
> -- 
> Hervé Pagès
>
> Program in Computational Biology
> Division of Public Health Sciences
> Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N, M2-B876
> P.O. Box 19024
> Seattle, WA 98109-1024
>
> E-mail: hpages at fhcrc.org
> Phone:  (206) 667-5791
> Fax:    (206) 667-1319
>
> _______________________________________________
> Bioc-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel



More information about the Bioc-devel mailing list