knitr::opts_chunk$set(echo = F) # グラフの標準フォント設定 # うまく行かない場合は手動で設定してください rmdja::set_graphics_font(rmdja::get_default_font_family("xelatex")["serif"])
rmdja
パッケージテンプレートの使い方bookdown
の機能をフルに使うには, 以下の点に注意してください.
index.Rmd
という名前にする図 \@ref(fig:plot) を見よ.
(ref:ggplot-example-article) ggplot2 を使用したデータのプロット
ggplot(mutate(mtcars, cyl = factor(cyl)), aes(x = mpg, y = wt, color = cyl)) + geom_point() + labs(x = "マイル毎米ガロン", y = "重量 (1000ポンド)") + theme_bw(base_family = rmdja::get_default_font_family("lualatex")["serif"]) + scale_color_grey() + scale_fill_grey()
表 \@ref(tab:example-table) を見よ
knitr::kable(head(mtcars[, 1:4]), caption = "表の例", booktabs = T)
このファイルの出力例は以下のコマンドでコピーすることができます.
file.copy(system.file("resources/examples/templates/pdf_book_ja/", package = "rmdja"), "./", recursive = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.