Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
Noam Ross 3393313fe2 Update redoc() documentation vor 11 Monaten
.github Request pandoc + rstudio versions in issue template vor 1 Jahr
R Set highlight_outputs to FALSE as default. vor 11 Monaten
inst Replace RPLACEHOLDERE with nbsp, addresses #49 vor 1 Jahr
man Update redoc() documentation vor 11 Monaten
pkgdown Fix broken link in navbar vor 1 Jahr
tests Use styler to style code vor 1 Jahr
vignettes Update mixed-workflows-with-redoc.Rmd vor 1 Jahr
.Rbuildignore Working refactor vor 1 Jahr
.gitignore Working refactor vor 1 Jahr
.travis.yml Move GitHub packages to Suggests for faster builds vor 1 Jahr
DESCRIPTION Set min versions of rmarkdown, officer, diffobj vor 1 Jahr
LICENSE first real commit vor 1 Jahr
NAMESPACE Working refactor vor 1 Jahr
NEWS.md Fix typo in NEWS vor 1 Jahr
README.Rmd Revert - remove Patreon links vor 1 Jahr
README.md Revert - remove Patreon links vor 1 Jahr
appveyor.yml Try old version of Pandoc on appveyor vor 1 Jahr
codecov.yml first real commit vor 1 Jahr
redoc.Rproj Handle YAML in header and elsewhere in document vor 1 Jahr


redoc - Reversible Reproducible Documents

Status AppVeyor build
status codecov CRAN

redoc is a package to enable a two-way R Markdown-Microsoft Word workflow. It generates Word documents that can be de-rendered back into R Markdown, retaining edits on the Word document, including tracked changes.

redoc is not yet stable; its core engine and API are still subject to change. It’s been overhauled a few times already! I welcome your contributions and feedback.


Install the redoc package with the remotes (or devtools) package:


Note that redoc requires a recent version of Pandoc (>= 2.1.2). If you have RStudio version 1.2 or higher, you should have this by default.

Basic Usage

redoc provides an R Markdown output format, redoc(), built on top of rmarkdown::word_document(). You will typically call it via the YAML header in your R Markdown document. You have the option of highlighting the outputs (both chunk and inline) in the Word Document.


redoc() output resembles typical R Markdown Word output, but has some key differences:

  • Critic Markup edits will be converted to Word tracked changes.
  • By default, parts of the documented generated programmatically will be highlighted. (Change this with highlight_outputs = FALSE)
  • The original .Rmd and all code is stored internally in Word document for later retrieval.

Word files that have been created by redoc() can be reverted to .Rmd with the dedoc() function, even after they are edited. dedoc() will return the path of the de-rendered document.

#> [1] "example.docx"
#> [1] "./example.Rmd"

If the Word document has tracked changes, dedoc() will, by default, convert these to back to Critic Markup syntax. However, tracked changes are not necessary. You can view the changes between the original R Markdown file and the de-rendered one using the redoc_diff() function.


More details and features can be found in the vignettes for users and developers.

RStudio Integration

redoc has three RStudio Addins to simplify workflow when working with R Markdown documents:

  • “Render and Update” renders an R Markdown Document and the updates the text after round-tripping in to Word format and back. This helps with cleaning up small syntax differences (e.g. white space, line wrapping).
  • “Dedoc to active file” and “Dedoc to new file” de-render a file and place the contents in RStudio editor tabs, and also display a the changes from redoc_diff() in the RStudio viewer.

The package also contains a dedoc R Markdown template.

  • officedown produces rich MS Word documents from R Markdown. We hope for more integration between these packages in the future.
  • diffobj visualizes differences between R objects and drives redoc’s diff view.


Want have feedback or want to contribute? Great! Please take a look at the contributing guidelines before filing an issue or pull request.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.