Skip to content

Fix R CMD check LaTeX error and notes - #71

Open
szimmer wants to merge 1 commit into
InseeFrLab:masterfrom
szimmer:fix-check-notes
Open

szimmer wants to merge 1 commit into
InseeFrLab:masterfrom
szimmer:fix-check-notes

Conversation

@szimmer

@szimmer szimmer commented Nov 4, 2026

Copy link
Copy Markdown

Summary

devtools::check(manual = TRUE) on master gave a warning (LaTeX error while building the PDF manual) and 3 notes. With this PR it gives 0 errors, 0 warnings, 0 notes.

Changes

  1. LaTeX error in the PDF manual (! LaTeX Error: There's no line here to end.): in write_hrc(), the fill_na parameter had a \cr directly after an \itemize{} list, which becomes a \\ with no line to end in LaTeX. Removed it (the end of the list already starts a new line). This was the only occurrence of that pattern.
  2. NOTE: non-standard file hrc in the check directory: the tab_multi_manager() example (the part outside \dontrun{}) wrote hrc/activity into the working directory. It now writes to file.path(tempdir(), "activity"); the rest of the example uses the returned path, so nothing else changes.
  3. NOTE: duplicated vignette title "Automatic analysis of metadata": auto_metadata_fr used the English %\VignetteIndexEntry. It now uses its French title, "Analyse automatique des métadonnées", like the other French vignettes. Its HTML is re-rendered; note that the committed auto_metadata_fr.html was out of date with its .Rmd, so the rendered diff also picks up content that was already in the source (e.g. the "Equations entre indicateurs" section).
  4. NOTE: non-staged installation: removed StagedInstall: no from DESCRIPTION. With staged installation, the package installs and loads correctly, including R's checks that it loads from the final location and keeps no record of the temporary installation path.

Question about StagedInstall: no

StagedInstall: no was added in c9a89a5 ("check cran", January 2024) without an explanation in the commit. Was there a specific reason for it, for example staged installs failing on INSEE workstations (network-mounted libraries, antivirus locking files during the move to the final location)? If so, I'm happy to restore it. It works fine without it on my setup (Windows 11, R with a local library), but I don't want to reintroduce a problem you've already hit.

Note

This overlaps with files touched by #69 (documentation cleanup), notably R/hrc.R, R/multitable.R and DESCRIPTION, so whichever is merged second may need a rebase. #69 does not fix these check issues. The changes here are one-line edits, so they should be easy to rebase.

🤖 Generated with Claude Code

- write_hrc(): remove a \cr right after an itemize list in the fill_na
  parameter, which broke the PDF manual ("There's no line here to end").
- tab_multi_manager() example: write the hrc file to tempdir() instead of
  "hrc/" in the working directory (left an 'hrc' folder in the check dir).
- auto_metadata_fr vignette: use the French title as VignetteIndexEntry,
  which duplicated the English vignette's entry; re-render its HTML, which
  was also out of date with the .Rmd.
- DESCRIPTION: drop "StagedInstall: no" (non-staged installation NOTE);
  staged installation works and passes R's install-path checks.

devtools::check(manual = TRUE): 0 errors, 0 warnings, 0 notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant