Skip to content

Submission to CRAN: size of documentation #259

@bryanhanson

Description

@bryanhanson

This is an early warning about an issue that may arise when submitting to CRAN. It may apply to other packages in the hySpc.* series as well. By the time we split everything out, this problem may disappear, but I'm doubtful. I discovered this when updating my own package ChemoSpec.

When I build, check and install locally I get the following notice:

  • checking installed package size ... NOTE
    installed size is 6.9Mb
    sub-directories of 1Mb or more:
    doc 5.3Mb

In order to compact the size of the documentation so the package is below the CRAN limit, we may have to make the following change in each vignette's yaml:

output:
#    bookdown::html_document2: # use for pkgdown site
    bookdown::pdf_document2: # use for CRAN to keep size down
      toc: yes
      toc_depth: 2
      fig_caption: yes
      number_sections: true # needed for section cross-refs to work

In my testing, nothing breaks in the vignettes by making this change. This means that a user doing browseVignettes will be offered the pdf version. Users will have to discover the html versions another way.

This change will only be needed when packaging for CRAN, and should be changed back to html_document2 when the CRAN submission is complete.

Apparently there is a lot of formatting code when html_document2 is used, and of course the graphics are in-lined too.

For another CRAN submission issue see #275

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions