Learn R Programming

  ______  
 /   ⚡  \
/litedown\
\   ⚡    /
 \______/

R Markdown Reimagined

This package provides a trimmed-down and reimagined implementation of R Markdown. It is much more lightweight, at the price of dropping some features. It does not depend on the R package knitr or the system package Pandoc.

Please consider this package experimental for now. The documentation is also very incomplete and still under development.

Usage

Installation

At the moment, you are recommended to install the development version from r-universe:

install.packages('litedown', repos = c('https://yihui.r-universe.dev', 'https://cloud.r-project.org'))

Markdown rendering

The function litedown::mark() is based on the R package commonmark, and renders Markdown to various output formats supported by commonmark, which are primarily HTML and LaTeX. MS Office formats are not supported.

Knitting

R Markdown documents need to be knitted to Markdown before being rendered to a target output format. The function litedown::fuse() plays a role similar to knitr::knit() and rmarkdown::render(). It fuses program code with narratives, i.e., it executes code in the source document and interweaves results with narratives in the output document.

Previewing

Try litedown::roam().

Scope

We want to limit the scope of this package. Most planned features have been (re-)implemented so far, such as reports, slides, books, websites (including package sites), and paged HTML documents, etc. See the set $R$ below:

$$\mathrm{litedown} = \min{{R}} + {D_i} - {D_e} + {J}$$

  • $R$ = knitr + evaluate + rmarkdown + bookdown + blogdown + pagedown + pkgdown + xaringan + tufte + distill + htmlwidgets

  • $D_i$ = (internal dependencies) commonmark + xfun

  • $D_e$ = (external dependencies) Pandoc + Bootstrap + jQuery + GitBook + Hugo + paged.js + remark.js + tufte.css + distill.js/.css + ...

  • $J$ = Lightweight vanilla JavaScript/CSS

Please feel free to file feature requests anyway, but we may be a little conservative when considering them (we will take votes into consideration, so please upvote features you like).

License

The litedown package is licensed under MIT.

Copy Link

Version

Install

install.packages('litedown')

Monthly Downloads

373,328

Version

0.7

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Yihui Xie

Last Published

April 8th, 2025

Functions in litedown (0.7)

smartypants

Convert some ASCII strings to HTML entities
reactor

Get and set chunk options
vest

Add CSS/JS assets to HTML output
markdown_options

Markdown rendering options
fuse_book

Fuse multiple R Markdown documents to a single output file
get_context

Get the fuse() context
fuse

Render Markdown, R Markdown, and R scripts
litedown-package

A lightweight version of R Markdown
fuse_env

The fuse() environment
html_format

Output formats in YAML metadata
fuse_site

Fuse R Markdown documents individually under a directory
crack

Parse R Markdown or R scripts
engines

Language engines
pkg_desc

Print the package description, news, citation, manual pages, and source code
timing_data

Get the timing data of code chunks and text blocks in a document
raw_text

Mark a character vector as raw output
roam

Preview Markdown and R Markdown files