Authoring Books and Technical Documents with R Markdown

Output formats and utilities for authoring books and technical documents with R Markdown.


bookdown

R-CMD-check CRAN release Codecov test coverage

A open-source (GPL-3) R package to facilitate writing books and long-form articles/reports with R Markdown. Features include:

  • Generate printer-ready books and ebooks from R Markdown documents
  • A markup language easier to learn than LaTeX, and to write elements such as section headers, lists, quotes, figures, tables, and citations
  • Multiple choices of output formats: PDF, LaTeX, HTML, EPUB, and Word.
  • Possibility of including dynamic graphics and interactive applications (HTML widgets and Shiny apps)
  • Support for languages other than R, including C/C++, Python, and SQL, etc.
  • LaTeX equations, theorems, and proofs work for all output formats
  • Can be published to GitHub, bookdown.org, and any web servers
  • Integrated with the RStudio IDE
  • One-click publishing to Posit Connect

Book

bookdown: Authoring Books and Technical Documents with R Markdown

Installation

You can install the package from CRAN as follows:

install.packages("bookdown")

If you want to use the development version of the bookdown package, you can install the package from GitHub via the pak package:

# install.packages("pak")
pak::pak('rstudio/bookdown')

Usage

The easiest way to start a new Bookdown project is from within RStudio IDE. Go to File > New Project > New Directory > Book project using bookdown.

This will create a new directory with an example book as template. You can build the HTML version of this example book without doing any modification:

  • Go into the Build Pane in the RStudio IDE
  • Click on Build Book > bookdown::gitbook

You can also run bookdown::render_book() in the R console.

Learn more about using bookdown in the Getting started section.

Getting help

There are two main places to get help:

  1. The RStudio community is a friendly place to ask any questions about bookdown. Be sure to use the bookdown tag.

  2. Stack Overflow is a great source of answers to common bookdown questions. Use the tags [r][bookdown] if you ask a question.

Code of Conduct

Please note that the bookdown project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("bookdown")

0.48 by Yihui Xie, 2 months ago


https://github.com/rstudio/bookdown, https://pkgs.rstudio.com/bookdown/


Report a bug at https://github.com/rstudio/bookdown/issues


Browse source code at https://github.com/cran/bookdown


Authors: Yihui Xie [aut, cre] , Christophe Dervieux [ctb] (ORCID: , JJ Allaire [ctb] , Albert Kim [ctb] , Alessandro Samuel-Rosa [ctb] , Andrzej Oles [ctb] , Atsushi Yasumoto [ctb] , Aust Frederik [ctb] , Bastiaan Quast [ctb] , Ben Marwick [ctb] , Chester Ismay [ctb] , Clifton Franklund [ctb] , Daniel Emaasit [ctb] , David Shuman [ctb] , Dean Attali [ctb] , Drew Tyre [ctb] , Ellis Valentiner [ctb] , Frans van Dunne [ctb] , Hadley Wickham [ctb] , Jeff Allen [ctb] , Jennifer Bryan [ctb] , Jonathan McPhers [ctb] , JooYoung Seo [ctb] , Joyce Robbins [ctb] , Junwen Huang [ctb] , Kevin Cheung [ctb] , Kevin Ushey [ctb] , Kim Seonghyun [ctb] , Kirill Muller [ctb] , Luciano Selzer [ctb] , Matthew Lincoln [ctb] , Maximilian Held [ctb] , Michael Sachs [ctb] , Michal Bojanowski [ctb] , Nathan Werth [ctb] , Noam Ross [ctb] , Peter Hickey [ctb] , Pedro Rafael D. Marinho [ctb] (ORCID: , Romain Lesur [ctb] , Sahir Bhatnagar [ctb] , Shir Dekel [ctb] , Steve Simpson [ctb] , Thierry Onkelinx [ctb] , Vincent Fulco [ctb] , Yixuan Qiu [ctb] , Zhuoer Dong [ctb] , Posit Software , PBC [cph, fnd] , Bartek Szopka [ctb] (The jQuery Highlight plugin) , Zeno Rocha [cph] (clipboard.js library) , MathQuill contributors [ctb] (The MathQuill library; authors listed in inst/resources/AUTHORS) , FriendCode Inc [cph, ctb] (The gitbook style , with modifications)


Documentation:   PDF Manual  


GPL-3 license


Imports htmltools, knitr, rmarkdown, jquerylib, xfun, tinytex, yaml

Suggests bslib, downlit, htmlwidgets, jsonlite, curl, rstudioapi, miniUI, rsconnect, servr, shiny, tibble, testit, tufte, xml2, webshot, testthat, withr

System requirements: Pandoc (>= 1.17.2)


Imported by Orcs, RTLknitr, Rbearcat, STARRS, apathe, blogdown, clinDataReview, distill, fabR, gWQS, gitdown, iheiddown, jarbes, jds.rmd, madshapR, marked, memoiR, moodlequiz, ncappc, ofpetrial, ogrdbstats, pagedown, papaja, rUM, revise, rjtools, rmdformats, rmdplugr, rolldown, rtemps, sae4health.

Suggested by AMPLE, BHMSMAfMRI, BHSBVAR, BSET, BSTFA, BayesPIM, BayesTSM, BioCro, BradleyTerry2, BrazilCrime, CalibrationCurves, ChemoSpec2D, CongreveLamsdell2016, DAAG, DFBA, Distance, EcotoneFinder, EloSteepness, HaDeX2, Holomics, IBMPopSim, JointAI, LMN, LMest, LearnPCA, LocalCop, LongitudinalEvalue, MRG, MultiATSM, NPRED, OCNet, OmopConstructor, PlackettLuce, Quartet, QurvE, RPyGeo, RTSA, RWDataPlyr, SimCorMultRes, SimCorrMix, Slick, SmCCNet, Spower, TreeDist, TriMatch, WASP, WQM, abn, accessr, actuaRE, adoptr, aldvmm, allMT, antitrust, bage, baselinenowcast, bigDM, blindrecalc, bmm, brickset, brokenstick, bsitar, campsis, causalCmprsk, cfr, chronicle, clustGLMM, clustTMB, clusterMI, cmtest, cols4all, comsimitv, crmPack, derivmkts, downscale, dsims, dynatop, eDITH, eha, epiR, epichains, epidist, epiparameter, equate, ern, expertsurv, finalsize, fitdistrplus, fitnmr, flextable, flippant, gaawr2, gamclass, gap, gbm, ggRandomForests, ghcm, glca, glossr, graphicalExtremes, grmsem, gwasrapidd, hSDM, healthequal, heplots, holiglm, humidity, huxtable, hyper2, iGraphMatch, icmstate, industRial, infometrics, jSDM, lintr, lmls, markovchain, matlib, metaselection, mhurdle, miceafter, missingHE, modelsummary, mrangr, mrds, mvs, nbc4va, nvctr, officedown, ottrpal, pQTLdata, pTITAN2, panelPomp, pcds, pcds.ugraph, pct, pcutils, permute, piglet, polySegratio, polySegratioMM, poputils, prepplot, primarycensored, prioritylasso, psfmi, qra, rangr, rbmi, readJDX, rehh, remiod, reservr, rivnet, rticles, rvec, salmonMSE, semPower, sequoia, serocalculator, serosv, singcar, skytrackr, slopes, slouch, smurf, sparseIndexTracking, sparseMVN, spbal, spsur, streamDAG, survivalVignettes, svmodt, tTOlr, tables, tabshiftr, taylor, texor, theorytools, trade, tufte, unusualprofile, validate, visStatistics, webexercises, ymlthis, zonebuilder.


See at CRAN