From sorenh at math.aau.dk  Thu Feb 20 15:45:07 2014
From: sorenh at math.aau.dk (=?utf-8?B?U8O4cmVuIEjDuGpzZ2FhcmQ=?=)
Date: Thu, 20 Feb 2014 14:45:07 +0000
Subject: [Rd] Where to put package vignettes
In-Reply-To: <3418272497vivigui@uv.es>
References: <7E8037094A0C2146AA3E6F94DAE621C39324847F@AD-EXCHMBX2-1.aau.dk>
	<3418272497vivigui@uv.es>
Message-ID: <7E8037094A0C2146AA3E6F94DAE621C39324868E@AD-EXCHMBX2-1.aau.dk>

Guillermino,

Sorry but I've never made it beyond Sweave in connection with R packages; we will have to wait for more insight from others.

S?ren

-----Original Message-----
From: Guillermo.Vinue at uv.es [mailto:Guillermo.Vinue at uv.es] 
Sent: 20. februar 2014 15:43
To: S?ren H?jsgaard
Cc: r-devel at r-project.org
Subject: RE: [Rd] Where to put package vignettes

Dear S?ren,

Thank you very much for your answer, it solved my problem and now my package can be installed both on Linux and Windows and the vignette is available in both systems. I put the vignette in /vignettes.

However, unfortunately my problems have not ended here. As mentioned, my vignette is built with knitr and with the following commands:

1) R CMD check foo
2) R CMD build foo
3) R CMD INSTALL foo_xxx.tar.gz

the vignette is built with Sweave!

I have read in http://yihui.name/knitr/demo/vignette/ that in that case, a Makefile should be incorporated.

I have incorporated in /inst/doc the makefile from https://github.com/yihui/knitr/blob/7eb34104/inst/doc/Makefile

however, my vignette is still built with Sweave. I use R 2.15.2.

How can I fix this performance?.

Thank you very much again.

Best regards,

Guillermo

> My understanding is this:
> 
> 1) Put vignettes files (.Rnw files) in the /vignettes subdirectory. 2)
Build the package foo with R CMD build foo. 3) Install the package with R CMD INSTALL foo_xxx.tar.gz
> 
> Then the vignettes will be available. However you can also install the
package with R CMD INSTALL foo, but then the vignettes will *not* be available (because it is in the build process that the vignettes go from /vignettes to /inst/doc)
> 
> Regards
> S?ren
> 
> 
> -----Original Message-----
> From: r-devel-bounces at r-project.org
[mailto:r-devel-bounces at r-project.org] On Behalf Of Guillermo.Vinue at uv.es
> Sent: 20. februar 2014 12:19
> To: r-devel at r-project.org
> Subject: [Rd] Where to put package vignettes
> 
> Dear R-devel list,
> 
> My name is Guillermo Vinu?. I have created an R package that includes
a vignette. Earlier on, to test my package, I tried to install it both in Linux and Windows and it worked. My vignette was in /inst/doc.
> 
> Now, I have finished for good and before submitting my package to CRAN
I've tried to install it again first in Linux and then in Windows (I removed that first installation some time ago).
> 
> My package was succesfully installed in Linux (Fedora 18 and R 2.15.2)
and the vignette was available. However, when trying to install it in Windows (R 3.0.2), unfortunately the vignette didn't appear. My vignette is build with knitr. 
> 
> In fact, if I first install the package on Windows, the vignette is
accesible, but then in Linux, not.
> 
> I have read that as from R 2.14.0 the preferred location for the
Sweave sources is the subdirectory vignettes of the source packages, but for compatibility with earlier versions of R, vignette sources will be looked for in inst/doc if vignettes does not exist.
> 
> Where do I have to put my vignette so that it could be available with
any installation and which files (.Rnw or .pdf) should be included?. 
> 
> I hope you can clarify my doubts. I have seen the collection of prior
postings to the list, but I have not found a specifical answer to my doubts .
> 
> Thank you very much in advance.
> 
> Best regards,
> 
> Guillermo
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 




[Rd] Where to put package vignettes
=?utf-8?B?U8O4cmVuIEjDuGpzZ2FhcmQ=?=