2

I tried to follow the instructions in https://cran.r-project.org/web/packages/R.rsp/vignettes/R_packages-Static_PDF_and_HTML_vignettes.pdf which shows how to include static pdf in vignette for . However, after following the instructions and creating the PDFs and asis files, I get the folowing warning when doing a check in version 3.6.2 on Windows.

Output(s) listed in 'build/vignette.rds' but not in package:
    'inst/doc/concepts.pdf'
    'inst/doc/convenience-features.pdf'
    'inst/doc/custom-group-by.pdf'
    'inst/doc/data-table-syntax.pdf'
    'inst/doc/glm.pdf'
    'inst/doc/group-by.pdf'
    'inst/doc/ingesting-data.pdf'
    'inst/doc/intro-disk-frame.pdf'

How do I resolve this? I checked, every one of these pdfs are in the vignettes folder and I also tried putting them into the doc folder and I still get the same warning.

The folder structure and project structure can be see here in this repo

xiaodai
  • 14,889
  • 18
  • 76
  • 140
  • 1
    Can you show the contents of your `.Rbuildignore` – dario Feb 23 '20 at 12:06
  • It's quite long but I have `^doc$`. Is that the problem? – xiaodai Feb 23 '20 at 12:09
  • I'd say so `If you wish to exclude a specific file or directory (the most common use case), you MUST anchor the regular expression. For example, to exclude a directory called notes, use ^notes$. ` [source](http://r-pkgs.had.co.nz/package.html) – dario Feb 23 '20 at 12:13
  • I am confused, am I supposed to have `^doc$` in .Rbuildignore or not? – xiaodai Feb 23 '20 at 12:35
  • Sorry, maybe I misunderstood your explanation. I don't do anything in/with the `doc/` directory and also **don't** have it in my `.Rbuildignore`. I have no idea why you would put files belonging to the vignette into `inst/`. I have all my vignette files in `vignettes/` – dario Feb 23 '20 at 12:44
  • I didn't put them there. It was just there. After I press Check in RStudio – xiaodai Feb 23 '20 at 12:45
  • And do you have these files in `inst/` in the source code directory or the built package? And why do you have `^doc$` in your buildignore? – dario Feb 23 '20 at 13:06
  • Can't remember why I had ^doc$, but those files are generated by the vignette process I think – xiaodai Feb 23 '20 at 13:13
  • now i remove ^doc$ then I get this in note N checking top-level files Non-standard file/directory found at top level: 'doc' – xiaodai Feb 23 '20 at 13:23
  • Without seeing your package structure it's going to be difficult to tell but 1. There should be no `doc/` directory in your source code, neither at root nor in `inst/`. 2. When I run Check in RStudio, no files are copied to `inst` in the package source, **HOWEVER** there will be a directory `doc/` created in the **installed packages** directory... – dario Feb 23 '20 at 13:39
  • Could you resolve your problem? – dario Feb 23 '20 at 14:12
  • no no no no no no – xiaodai Feb 23 '20 at 14:21
  • Can you append your question with the structure of you project? And why is there a `doc` directory? – dario Feb 23 '20 at 14:24

1 Answers1

1

Several of my packages just use the scheme first written about here by Mark van der Loo.

You can just look at several of my packages wheren generally I now places the sources in vignettes/rmd and have a Makefile put the pdfs in vignettes/pdf. The key is to then use a simple Sweave run to just include the already-made body of the pdf vignette into a new document.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725
  • was it done on a Linux system or mac or Windows? Perhaps the issue is just windows – xiaodai Feb 27 '20 at 03:55
  • 1
    Works on all the same way because it relies on the original method: Sweave. (Which will need a minimal latex installation as we use latex to 'glue' a minimal pdf wrapper around the premade static vignette). Works _great_ in my view. – Dirk Eddelbuettel Feb 27 '20 at 15:10