How do I 'prebuild' a vignette index for an R package?

后端 未结 2 1570
生来不讨喜
生来不讨喜 2021-01-11 13:18

I\'m preparing a package for submission to CRAN. I use R CMD build myPackage then R CMD check myPackage --as-cran and it passes all checks with no

相关标签:
2条回答
  • 2021-01-11 13:49

    This may help, or you can turn to devtools to build your package.

    0 讨论(0)
  • 2021-01-11 13:59

    I gather the Vignette commands need to be in the preamble, i.e. below documentclass, so that the file myVignette.Rnw should read:

    \documentclass{article}
    
    % \VignetteIndexEntry{myVignette}
    % \VignetteEngine{knitr::knitr}
    
    \usepackage[]{graphicx}
    ...
    

    This seems to work fine.

    The error message is from the development version of R CMD check which is currently 3.3.0. I have been using the older 'stable' version which is not the recommended way to check packages when considering submission to CRAN.

    I'm still not sure of the merits of using a manual index.html file - it appears unnecessary but I will gladly change the accepted answer if anyone can throw some light on this.

    0 讨论(0)
提交回复
热议问题