在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:juba/rmdformats开源软件地址:https://github.com/juba/rmdformats开源编程语言:CSS 51.1%开源软件介绍:rmdformatsThis R package provides ready-to-use HTML output formats and templates for RMarkdown documents. The goal is to produce clean documents "out of the box", with or without the RStudio IDE. Formats galleryThe package provides several HTML output formats. Click on any image to see an HTML output sample.
|
Responsive | Dynamic TOC | Dark mode | Thumbnails / Lightbox | Code folding | Tabsets | Bad joke | |
---|---|---|---|---|---|---|---|
html_docco | x | x | x | x | |||
html_clean | x | x | x | x | x | ||
readthedown | x | x | x | x | |||
material | x | x | x | ||||
robobook | x | x | x | x | x | ||
downcute | x | x | x | x | x | x | |
lockdown | x |
The package also provides RStudio document templates to easily generate an empty and ready to use rmarkdown file with several configuration directives.
It also provides the pilltabs()
helper function, which allows to display a crosstab dynamically. See one of the output samples for a live example.
You can install the latest stable release from CRAN :
install.packages("rmdformats")
Or the latest development snapshot from GitHub :
install.packages(remotes) # if necessary
remotes::install_github("juba/rmdformats")
Just create a new Rmd
file and add the following in your YAML preamble :
---
output: rmdformats::<template name>
---
Within RStudio , you can also choose File
> New File...
> R Markdown...
, then select From Template
. You should then be able to create a new document from one of the package templates.
Depending on the features provided by the template, you can add the following options to your YAML preamble. Look at the template function help page for a valid list :
fig_width
: figures width, in inchesfig_height
: figures height, in inchesfig_caption
: toggle figure caption renderinghighlight
: syntax highlightingthumbnails
: if TRUE, display content images as thumbnailslightbox
: if TRUE, add lightbox effect to content imagesgallery
: if TRUE, add navigation between images when displayed in lightboxuse_bookdown
: if TRUE, will use bookdown
instead of rmarkdown
for HTML rendering, thus providing section numbering and cross references.embed_fonts
: if TRUE
(default), use local files for fonts used in the template instead of links to Google Web fonts. This leads to bigger files but ensures that the fonts are availablehtml_document
RMarkdown templateExample preamble :
---
title: "My document"
date: "`r Sys.Date()`"
author: John Doe
output:
rmdformats::downcute:
self_contained: true
thumbnails: true
lightbox: true
gallery: false
highlight: tango
---
html_docco
format is heavily inspired from the default one of the docco project.readthedown
is adapted from the corresponding readtheorg
theme of the org-html-themes project, which is itself inspired by the Read the docs Sphinx theme.material
has been taken from the Material design theme for Bootstrap 3 project and its presentation page.robobook
is directly derived from the bookdown project template.downcute
is directly derived from the default theme of the docute project and its adaptation by John Coene for some of its projects documentation.downcute chaos
theme has been created by Zac Garland.rmarkdown
HTML template.html_clean
styling and features are very similar to the ones from the
knitrBootstrap package by Jim
Hester.
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论