[R-pkg-devel] R CMD check not finding my vignettes

Duncan Murdoch murdoch.duncan at gmail.com
Thu Apr 20 15:42:52 CEST 2017


On 20/04/2017 4:57 AM, Brian G. Peterson wrote:
> David,
>
> I'd suggest creating a vignette for each of HTML and PDF, and including
> a source file that contains the common code.  e.g. have a pdf header and
> an html header file, and then include the 'main' Rmd as a child doc from
> each header Rmd.  This way R CMD build could build both pdf and html
> versions of the output.

That's another solution.  My suggestion would be simpler:  just pick one 
of PDF or HTML, and give the user instructions to produce the other if 
necessary, but don't produce it for them.

Duncan Murdoch

>
> Regards,
>
> Brian
>
> On 04/20/2017 03:38 AM, David Hugh-Jones wrote:
>> Hi Duncan,
>>
>> Thank you very much for taking the time to look at this.
>>
>> I tried rebuilding the tar file so as to include only the .Rmd files, not
>> the HTML files, in 'vignettes':
>>
>> drwxr-xr-x  0 david  staff       0 20 Apr 09:21 huxtable/vignettes/
>>
>> -rw-r--r--  0 david  staff    1633  6 Apr 16:26
>> huxtable/vignettes/comparison.csv
>>
>> -rw-r--r--  0 david  staff    6697  6 Apr 14:44
>> huxtable/vignettes/design-principles.Rmd
>>
>> -rw-r--r--  0 david  staff    5521  6 Apr 14:30
>> huxtable/vignettes/huxreg.Rmd
>>
>> -rw-r--r--  0 david  staff   20552  6 Apr 16:19
>> huxtable/vignettes/huxtable.Rmd
>>
>> -rw-r--r--  0 david  staff      22 17 Mar 00:19
>> huxtable/vignettes/placeins-header.tex
>>
>>
>> But when I run R CMD check, I still get the same warning:
>>
>> * checking package vignettes in ‘inst/doc’ ... WARNING
>>
>> Package vignettes without corresponding PDF/HTML:
>>
>>    ‘design-principles.Rmd’
>>
>>    ‘huxreg.Rmd’
>>
>>    ‘huxtable.Rmd’
>>
>> So, the warning does not seem to be related to the presence of HTML files
>> in vignettes.
>>
>> I also tried manually removing .Rmd files from inst/doc (leaving them only
>> in vignettes) but this still gave the same error.
>>
>> My goal here is that for package-specific reasons, I would like both pdf
>> and HTML versions of my vignettes to be available (I am writing code that
>> prints HTML and LaTeX tables and want my users to have examples of how both
>> output formats work). This is why I build those files manually, and place
>> them in inst/doc.
>>
>> Side comment: at the moment, I feel as if I am running through the
>> combinatorics of including and excluding files from vignettes and inst/doc,
>> without much insight into what I am doing. Would it be fair to say that the
>> current system is not very easy to comprehend?
>>
>> Cheers,
>>
>> David
>>
>> On 19 April 2017 at 21:24, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
>>
>>> On 19/04/2017 1:00 PM, David Hugh-Jones wrote:
>>>
>>>> Hi Uwe,
>>>>
>>>> I'm not sure if you ever got my off-list message with my tarball or
>>>> subsequent messages. I can't send a tarball on-list - it gets rejected as
>>>> too large - but here is a dropbox link. If you could confirm receipt, that
>>>> would be extremely helpful!
>>>>
>>>> https://www.dropbox.com/s/179jrm19kx9o7dz/huxtable_0.2.0.tar.gz?dl=0
>>>>
>>>>
>>> Not sure if Uwe has had a chance to look, but I just ran R CMD check on
>>> your tarball using the latest version of R-devel.  It reported the
>>> following problems:
>>>
>>> * checking CRAN incoming feasibility ... NOTE
>>> Maintainer: ‘David Hugh-Jones <davidhughjones at gmail.com>’
>>>
>>> Found the following (possibly) invalid URLs:
>>>   URL: http://cran.rstudio.com/web/packages/huxtable/index.html
>>>     From: README.md
>>>     CRAN URL not in canonical form
>>>   Canonical CRAN.R-project.org URLs use https.
>>>
>>> The URL for your package should be in the form
>>>
>>> https://CRAN.R-project.org/package=huxtable
>>>
>>> * checking top-level files ... NOTE
>>> Non-standard file/directory found at top level:
>>>   ‘multirow.rds’
>>>
>>> I'm not sure where that file belongs, but not there.
>>>
>>> * checking files in ‘vignettes’ ... WARNING
>>> Files in the 'vignettes' directory newer than all files in 'inst/doc':
>>>   ‘huxreg.html’, ‘huxtable.html’
>>>
>>> Those files shouldn't be in the vignettes directory, they are products of
>>> building the vignettes.  Only the source should normally be in the
>>> vignettes directory.
>>>
>>> * checking package vignettes in ‘inst/doc’ ... WARNING
>>> Package vignettes without corresponding PDF/HTML:
>>>    ‘design-principles.Rmd’
>>>    ‘huxreg.Rmd’
>>>    ‘huxtable.Rmd’
>>>
>>> I think this is the warning you were asking about.  If I look at just the
>>> first of those files, I see that design-principles.Rmd exists in vignettes
>>> and is set to produce PDF output (only the first output entry in the YAML
>>> counts).  You also have a .html file in vignettes; it shouldn't be there.
>>> In inst/doc, you have source, .html and .pdf versions of that file.
>>>
>>> The warning isn't very helpful, but I think it is triggered by the fact
>>> that you've got the .html file in your vignettes directory.  If I remove
>>> everything but the source from that directory, and everything from the
>>> inst/doc directory, then all the vignette warnings go away.
>>>
>>> (I haven't traced through the code, but I think the warning may be
>>> literally correct.  Since you had .html files that looked like vignette
>>> outputs but weren't, you have vignettes without *corresponding* HTML. It
>>> would have been nicer if it suggested how to fix this, but that vignette
>>> code is quite tricky, because any file could be source, and any html, tex
>>> or pdf file could be output.  At some point I may try to clean it up a bit
>>> and then maybe the error messages will be less obscure.)
>>>
>>> Duncan Murdoch
>>>
>>
>> 	[[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-package-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>>
>
>



More information about the R-package-devel mailing list