Skip to content

📄🔄 Autofill an R Markdown document with a loop, rendering to .docx with a style template

License

Notifications You must be signed in to change notification settings

conorjudge/mail-merge-2018

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mail-merge-2018

Blog post

TL;DR

This repository supports the blog post 'Mail Merge in 2018 in R'.

You need to populate a .docx (or .html or .pdf) template hundreds of times. Automate this with R, R Markdown, a style document and knitr.

Purpose

With beginner R users from my department in mind, this repository contains files that:

  • create an R Markdown template to be filled with data
  • use a loop to fill the template with data for each row of your tidy dataset in turn
  • render the template to .docx format with reference to a style template

The data used here are from the Wikipedia entry for Dawson's Creek episodes.

To download

Click the green button 'Clone or download' and then 'Download ZIP'. After unzipping, open the .Rproj file.

Or clone with git clone https://github.com/matt-dray/knitting-club.git.

About

📄🔄 Autofill an R Markdown document with a loop, rendering to .docx with a style template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%