Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#171 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
markdown, r
領域
documentation

調査の方向性

issueに記載されている、対象となる10個のHTMLビネットのYAMLヘッダーを更新し、self_contained: noをyesに変更します。まず、記載されているビネットを1つ確認し、10個すべてが同じ設定であることを確認します。次に、R CMD build .を実行し、ビルドされたinst/doc/*.htmlを調べます。インストールされたビネットのHTMLに必要なアセットが含まれ、表と図が表示されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.)

主要言語
R
スター
23
フォーク
6
平均マージ
2日 9時間
マージ済み PR(30日)
12

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Merck/forestly のほかの issue

Merck/forestly の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。