---
title: はじめてのQuarto
tags:  #r with pharma lab meetup 1  
author: [森岡裕[SASユーザー総会世話人]](https://www.docswell.com/user/6484025)
site: [Docswell](https://www.docswell.com/)
thumbnail: https://bcdn.docswell.com/page/GEWGPKP6J2.jpg?width=480
description: はじめてのQuarto by 森岡裕[SASユーザー総会世話人]
published: April 06, 26
canonical: https://www.docswell.com/s/6484025/5Y8DEV-2026-04-06-112929
---
# Page. 1

![Page Image](https://bcdn.docswell.com/page/GEWGPKP6J2.jpg)

1
はじめてのQuarto
R with
Pharma
Lab
茅根健 (Takeru Chinone)
イーピーエス株式会社
2026-04-08

# Page. 2

![Page Image](https://bcdn.docswell.com/page/47ZLKZKRJ3.jpg)

2
発表の目的
• はじめて Quarto に触れる方、あまり触れたことがない方を対象に Quarto を知って
いただくこと
注意事項
• Quarto は内容が多岐にわたるため、すべてをカバーする内容となっておりません
• 詳細や不明点は公式サイトをご確認ください
▪ quarto

# Page. 3

![Page Image](https://bcdn.docswell.com/page/YJ6WQZQ1JV.jpg)

3
1. Quarto とは
2. Quarto の事例紹介
3. Quarto に触れてみよう
4. まとめ

# Page. 4

![Page Image](https://bcdn.docswell.com/page/GJ5MRWRLJ4.jpg)

5
1. Quarto とは
2. Quarto の事例紹介
3. Quarto に触れてみよう
4. まとめ

# Page. 5

![Page Image](https://bcdn.docswell.com/page/LE3WP4PDE5.jpg)

6
quarto とは
• Posit 社が開発したオープンソースの科学技術文書作成システム
▪ quarto
• コード/実行結果/数式/文章を1つのソースから文書として生成
• R/Python/Julia など複数の言語を同じ文書内で使用可能
• HTML/PDF/Word/PowerPoint など様々な形式で文書やスライドを生成可能
• ファイルの拡張子は .qmd
Allison Horst

# Page. 6

![Page Image](https://bcdn.docswell.com/page/8EDKLQL27G.jpg)

7
具体例 1/2
1 library(tidyverse)
2
3 ggplot(mpg, aes(x = hwy, y = cty, color = cyl)) +
4 geom_point(alpha = 0.5, size = 2) +
5 scale_color_viridis_c() +
6 theme_minimal()
cyl
8
7
6
5
4
35
30
25
20
15
10
20
30
40
hwy

# Page. 7

![Page Image](https://bcdn.docswell.com/page/V7PK2L2LJ8.jpg)

8
具体例 2/2
A Quarto Page Layout Example
Inspired by Tufte Handout, Using Quarto
PUBLISHED
April 30, 2023
Other Formats
PDF
Introduction
This document demonstrates the use of a number of advanced page layout features to produce an attractive and usable
document inspired by the Tufte handout style and the use of Tufte&#039;s styles in RMarkdown documents (Xie, Allaire, and
Grolemund 2018). The Tufte handout style is a style that Edward Tufte uses in his books and handouts. Tufte&#039;s style is known
for its extensive use of sidenotes, tight integration of graphics with text, and well-set typography. Quarto¹ supports most of
the layout techniques that are used in the Tufte handout style for both HTML and LaTeX/PDF output.
---
title: &quot;An Example Using the Tufte Style&quot;
author: &quot;John Smith&quot;
format:
html:
grid:
margin-width: 350px
pdf: default
reference-location: margin
citation-location: margin
---
1 Increases the width of the margin to make more room for sidenotes and margin figures (HTML only).
2 Places footnotes and cited sources in the margin. Other layout options (for example placing a figure in the margin) will
be set per element in examples below.
1 To learn more, you can read more about Quarto or
visit Quarto&#039;s Github repository.
Xie, Yihui, J. J. Allaire, and Garrett Grolemund. 2018.
&quot;Tufte Handouts.&quot; In R Markdown: The Definitive Guide,
137-46. Chapman: Hall/CRC.
https://doi.org/10.1201/9781138359444-6.
Quarto Gallery

# Page. 8

![Page Image](https://bcdn.docswell.com/page/2JVVDQD6JQ.jpg)

9
Quarto の強み
• コード/実行結果/数式/文章を1つのソースから文書として生成
• 基となるデータが変更された際に再生成可能な再現性のあるドキュメントの作成が可能
• R/Python/Julia など複数の言語を同じ文書内で使用可能
• HTML/PDF/Word/PowerPoint など様々な形式で文書やスライドを生成可能
• 公式サイトなど情報が豊富
▪ quarto

# Page. 9

![Page Image](https://bcdn.docswell.com/page/5EGLYWY2JL.jpg)

11
1. Quarto とは
2. Quarto の事例紹介
3. Quarto に触れてみよう
4. まとめ

# Page. 10

![Page Image](https://bcdn.docswell.com/page/4JQYM3M97P.jpg)

12
CAMIS
• PHUSE、PSI、ASA、IASCT の各団体メンバーと共同で運営されている、業界横断的
な PHUSE DVOST WG
▪ CAMIS (Comparing Analysis Method Implementations in Software)
• 本プロジェクトの目的は、主に SAS、R、Python といったプログラミング言語間にお
ける統計解析手法や解析結果の差異を解明するため、それらの類似点と相違点について
比較と包括的な説明を行うこと
Repository
The repository below provides examples of statistical methodology in different software and languages, along
with a comparison of the results obtained and description of any discrepancies.
Statistical Methodology
R
SAS
Python
Comparison
Summary Statistics
Rounding
R
SAS
Python
R vs SAS
Summary statistics
R
SAS
Python
R vs SAS
Skewness/Kurtosis
R
SAS
Python
R vs SAS
General Linear Models
One-sample t-test
R
SAS
Python
R vs SAS
Paired t-test
R
SAS
Python
R vs SAS
Two-sample t-test
R
SAS
Python
R vs SAS
ANOVA
R
SAS
Python
R vs SAS
ANCOVA
R
SAS
Python
R vs SAS
MANOVA
R
SAS
Python
R vs SAS
Linear regression
R
SAS
Python
R vs SAS
Generalized Linear Models
Logistic regression
R
SAS
Python
R vs SAS
On this page
Introduction to CAMIS
Motivation
Repository

# Page. 11

![Page Image](https://bcdn.docswell.com/page/K74WV14RE1.jpg)

13
そのほかの事例
• Documents
▪ R for Data Science (2e)
▪ Causal Inference in R
▪ Time Series Analysis
• Dashboard
▪ Palmer Penguins Cobblepot Analytics
• Quarto Live Documentation
▪ Interactive Code Blocks

# Page. 12

![Page Image](https://bcdn.docswell.com/page/LJ1Y3G4VEG.jpg)

14
R Submission Pilot
• R を使用した FDA submission の実証実験
• R で作成したデータセット、解析結果、R のパッケージや実行環境で FDA 申請でき、
レビュー側が再現、評価できるか、何が課題かを検証することが目的
▪ R Submissions Working Group
▪ R Submissions Working Group: 2026 Plans and 2025 Success
• Pilot 5 では ADRG (Analysis Data Reviewer’s Guide) が Quarto で作成された
▪ ADRG
▪ adrg.qmd

# Page. 13

![Page Image](https://bcdn.docswell.com/page/GJWGPKX372.jpg)

16
1. Quarto とは
2. Quarto の事例紹介
3. Quarto に触れてみよう
4. まとめ

# Page. 14

![Page Image](https://bcdn.docswell.com/page/4EZLKZ6G73.jpg)

17
Quarto に触れてみよう 1/3

# Page. 15

![Page Image](https://bcdn.docswell.com/page/Y76WQZ2Q7V.jpg)

18
Quarto に触れてみよう 2/3
4. qmd ファイルを保存し、Render をクリック
• YAMLヘッダー
▪ タイトル、サブタイトル、著者、日
付などのメタデータや、テーマや目
次などを設定する
▪ 使用可能なYAMLフィールドは文書
形式によって異なる

# Page. 16

![Page Image](https://bcdn.docswell.com/page/G75MRW2274.jpg)

19
Quarto に触れてみよう 3/3
5. html ファイルが作成できた!!
Untitled
Quarto
Quarto enables you to weave together content and executable code into a finished document. To
learn more about Quarto see https://quarto.org.
Running Code
When you click the Render button a document will be generated that includes both content
the output of embedded code. You can embed code this:
1 + 1
[1] 2
You can add options to executable code this
[1] 4
The echo: false option disables the printing of code (only output is displayed).

# Page. 17

![Page Image](https://bcdn.docswell.com/page/9J29DQ41ER.jpg)

20
ここまで Quarto に触れてみて…
• 実装することは難しいのではないか？
• コードを見ると複雑そう…
• Quarto の事例や情報は豊富

# Page. 18

![Page Image](https://bcdn.docswell.com/page/DEY42WM4JM.jpg)

21
Quarto の事例や情報は豊富 1/5
• Guide|quarto

# Page. 19

![Page Image](https://bcdn.docswell.com/page/VJNY89W678.jpg)

22
Quarto の事例や情報は豊富 2/5
• Gallery|quarto

# Page. 20

![Page Image](https://bcdn.docswell.com/page/YE9PK2XRJ3.jpg)

23
Quarto の事例や情報は豊富 3/5
• Gallery|quarto
• ソースコード (.qmd) をダウンロード可能

# Page. 21

![Page Image](https://bcdn.docswell.com/page/GE8DR52GED.jpg)

24
Quarto の事例や情報は豊富 4/5
• ダウンロードしたファイルを RStudio で開き「Render」をクリック
• RStudio 以外で実行する場合は公式サイトから Quarto のインストールが必要
▪ Get Started|quarto

# Page. 22

![Page Image](https://bcdn.docswell.com/page/LELMKY2X7R.jpg)

25
Quarto の事例や情報は豊富 5/5
• 結果が再現できた!!

# Page. 23

![Page Image](https://bcdn.docswell.com/page/4JMY2N83JW.jpg)

26
シミュレーションや例数設計にも活用可能
• cache を設定すれば不要な再実行なく、レンダリング可能
BOINデザイン シミュレーション
AUTHOR
Your Name
目的
本資料では、BOINデザインを用いたがん第1相試験のシミュレーション結果をまとめる。
各シナリオにおける以下の operating characteristics を比較する。
• MTD 選択確率
• 各用量への割付割合
• 平均サンプルサイズ
• 早期中止割合
• 各シナリオの詳細結果
試験デザイン設定
項目
設定値
目標DLT確率
0.3
コホートサイズ
3.0
最大患者数
18.0
最大コホート数
6.0
早期中止判定患者数
9.0
シミュレーション回数
10000.0
シナリオ設定

# Page. 24

![Page Image](https://bcdn.docswell.com/page/PJR9MD5R79.jpg)

28
1. Quarto とは
2. Quarto の事例紹介
3. Quarto に触れてみよう
4. まとめ

# Page. 25

![Page Image](https://bcdn.docswell.com/page/PEXQV1KYJX.jpg)

29
Quarto
• コード/実行結果/数式/文章を1つのソースから文書として生成
• データやコードを変更すると文書を作り直すだけで結果を更新可能
• HTML/PDF/Word/PowerPoint など様々な形式で文書やスライドを生成可能
• オープンソースであるため情報が豊富
• 使用事例も豊富で、活用範囲も広い

# Page. 26

![Page Image](https://bcdn.docswell.com/page/3EK9Q254ED.jpg)

30
Quarto 関連リンク
• quarto
• 私たちのR
• R for Data Science (2e)

