Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Installed vignettes show blank tables/plots: self_contained: no drops lt assets on R CMD build

Abierto Apto para principiantes
#171 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
84/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
markdown, r

Línea de trabajo

Actualiza los encabezados YAML de las 10 viñetas HTML afectadas que se enumeran en el issue, cambiando self_contained: no por yes. Empieza comprobando una de las viñetas enumeradas y confirma que las 10 tienen la misma configuración; luego ejecuta R CMD build . e inspecciona los inst/doc/*.html generados. El trabajo estará terminado cuando el HTML de la viñeta instalada incluya los recursos necesarios y se rendericen las tablas y las figuras.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Problem

After R CMD build + R CMD INSTALL, opening the installed vignette .html files (inst/doc/*.html) in a browser shows no tables or plots — the interactive AE forest tables and the dot-plot/error-bar figures are missing. The prose renders, but the table area is blank.

Root cause

Every HTML vignette sets self_contained: no in its YAML header:

output:
  rmarkdown::html_document:
    self_contained: no

With self_contained: no, pandoc writes the lt JS/CSS (and other web dependencies) into a <vignette>_files/ sidecar directory and references them with relative <script src="..._files/lt-x.y.z/lt-interactive.js"> tags. R CMD build strips these _files/ sidecar directories from the built package, so the installed .html points at assets that do not exist. No JS loads, and since the lt table is built entirely client-side from an embedded spec, nothing renders.

This is preexisting but only became visible once all table/figure rendering moved to client-side JS (lt); the old static-image paths masked it.

Reproduction
  1. R CMD build . then extract the tarball.
  2. inst/doc/customize-color.html references customize-color_files/lt-*/lt-interactive.js.
  3. No *_files/ directory exists anywhere in the build.
  4. Open the installed .html in a browser → blank table.
Verification
  • Standalone render opened directly in a browser works (deps resolve from the local _files/), which is why this is easy to miss during rmarkdown::render() dev loops.
  • Headless check of the built-tarball inst/doc/customize-color.html confirms the table does not mount.

Fix

Set self_contained: yes (the rmarkdown default) in the affected vignettes so pandoc inlines all JS/CSS into a single standalone .html. The lt assets are small (the old reactable+plotly bulk that likely motivated self_contained: no is gone), so inlining is cheap.

Verified: with self_contained: yes, R CMD build produces inst/doc/*.html with zero external _files/lt references and no sidecar directory; a headless browser renders the table (10 rows) and all 42 inline SVG figures with no JS errors.

Affected files (all 10 HTML vignettes carrying self_contained: no):
customize-ae-specific-columns, customize-color, customize-diff-label, customize-digits, customize-display-only-soc, customize-listing-columns, customize-toggle-buttons, customize-width, customize-xlimit, forestly.

(design-pattern.Rmd uses html_vignette and is unaffected; both forestly.Rmd and design-pattern.Rmd are in .Rbuildignore, so they are not shipped as installed vignettes anyway.)

Lenguaje dominante
R
Estrellas
23
Forks
6
Merge medio
2 d 9 h
PR fusionados (30 d)
12

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Merck/forestly

Todos los issues de Merck/forestly

Issues similares

Más issues de R

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.