• Stars
    star
    504
  • Rank 87,537 (Top 2 %)
  • Language
    R
  • License
    Other
  • Created about 6 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[NOTE: Project in suspended animation for now] Reversible Reproducible Documents

redoc - Reversible Reproducible Documents

License: MIT Project Status: Suspended – Initial development has started, but there has not yet been a stable, usable release; work has been stopped for the time being but the author(s) intend on resuming work. Build Status AppVeyor build status codecov

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 (and currently in suspended mode); its core engine and API are still subject to change. It’s been overhauled a few times already! I welcome your contributions and feedback (though it'll take a bit to get to them).

Installation

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

remotes::install_github("noamross/redoc")

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.

---
output:
  redoc::redoc
---

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.

library(redoc)
print(basename(redoc_example_docx()))
#> [1] "example.docx"
dedoc(redoc_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.

redoc_diff(redoc_example_edited_docx())

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.

Related Work

  • 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.

Contributing

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.

More Repositories

1

gams-in-r-course

Generalized Additive Models in R: A Free Interactive Course
CSS
231
star
2

gam-resources

180
star
3

nyhackr-docker-talk

Slides, Code, and Links to Resources from "Docker for the User," delivered at nyhackr 2018-07-11
R
143
star
4

zero-dependency-problems

Real-world code problems in R, without dependencies
77
star
5

noamtools

Miscellaneous convenience functions for R
R
47
star
6

reprotemplate

A template for reproducible R projects using targets, renv, Docker, and GitHub Actions
R
26
star
7

rchie

An R parser for ArchieML. ⛔️ ARCHIVED ⛔️
JavaScript
24
star
8

juicer

A thin wrapper for in-lining CSS styles into HTML
JavaScript
22
star
9

wassa

WebAssembly Stochastic Simulation Algorithm, OR Adventures in Polyglot Packaging
HTML
21
star
10

datacamp-sexual-assault

https://www.noamross.net/2019/04/12/datacamp-sexual-assault/
HTML
19
star
11

noamross.net

Repository for my personal website
HTML
19
star
12

arrr

Translates ye lubbery words
R
17
star
13

mgcv-esa-2018

HTML
16
star
14

quickscraper

An R package wrapping quickscrape, a node.js web scraper
R
16
star
15

htmlhelp

Enhanced HTML R documentation
R
15
star
16

targets-minio-versioning

R
14
star
17

rmd-rant

13
star
18

pbjob

Run R Scripts and Jobs with Pushbullet Alerts
R
10
star
19

mkrpkg

Template for making R packages
R
9
star
20

jekyll-site

Pre-jekyll-processed website
HTML
9
star
21

upipe

R
8
star
22

2019-05-11-rstatsnyc-talk

Slides from: Reproducibility in An Office World talk, introducing the redoc package
8
star
23

2018-11-06-rladies-talk

Slides from a talk given at the R-Ladies NYC meetup
7
star
24

rexr

An R wrapper for the rexpy python module
Python
5
star
25

rockerbuilder

Convenience functions for building Rocker Dockerfiles
R
4
star
26

rrtools

Draft repo for project reproducibility tools
4
star
27

archive-airtable

Workflow to get an AirTable schema and archive as CSVs + attachments in a git repository
R
4
star
28

rnodejs

A helper package to create node.js module wrappers.
R
3
star
29

S-Maps

R code/package for nonlinear forecasting and regime shift detecting
R
3
star
30

scrapetools

R
3
star
31

juno

R
3
star
32

dockuda

3
star
33

getting-unstuck-r

A lesson in problem-solving in R
CSS
3
star
34

shpdf

JavaScript
3
star
35

Working-Code

misc. stuff
R
3
star
36

esaprog

textual analysis of the ESA 2014 (and 2013) program
R
3
star
37

Tree-Death-Physiological-Models

R
2
star
38

projtools

2
star
39

ARE277

Code for my natural resources economics class; dynamical systems and optimization
R
2
star
40

luar

Experimental embedding of lua in R
C
2
star
41

googledocs

R
2
star
42

nyhackr-doltr-2022-05-19

R
2
star
43

wp_orcid

ORCiD plugin for Wordpress
2
star
44

eeid-workshop-2022

script presented in the EEID 2022 pandemic modeling workshop.
R
2
star
45

rsite

An NFSN-hosted Shiny, Plumber, FastRWeb site
R
1
star
46

search-sabrecov-recombination

1
star
47

tidyrecipes

1
star
48

mixed-workflows

1
star
49

dotfiles

Objective-C
1
star
50

driver

R
1
star
51

Pollen

R
1
star
52

labnotebook

Rebooted lab notebook website
1
star
53

swcpad

An experiment in simple live-code sharing
HTML
1
star
54

hfa

1
star
55

tracer

collect trace information from R optimization functions
R
1
star
56

pubtime

A project to collect and analyze submission-to-publication times in ecology journals
R
1
star
57

texttable

HTML
1
star
58

SODDr

Sudden Oak Death work
R
1
star
59

balleRs

Tools for locating high-value R users across the web
R
1
star
60

tiledb-rocker

An experimental Rocker-like image with TileDB
Shell
1
star
61

eqnfree

Equation-free modeling of multiscale systems
R
1
star
62

mgcv-talk

HTML
1
star
63

2018-04-18-rstats-nyc

1
star
64

dissertation

TeX
1
star
65

redirectr-ff

JavaScript
1
star
66

ibipm

Individual-Based Integro-Projection Models
TeX
1
star