I writing a Word document with R markdown in R Studio. I can get many things, but at the moment I am not figuring out how can I get a page break. I have found solutions but
You can use the R package worded
. This avoids the need for a template word file. See https://github.com/davidgohel/worded.
The output
parameter needs to be set to worded::rdocx_document
and you need to call library(worded)
.
---
date: "2018-03-27"
author: "David Gohel"
title: "Document title"
output:
worded::rdocx_document
---
```{r setup, include=FALSE}
library(worded)
```
You can then add to your document whenever you want a page break.
The package allows various word formatting options using a similar mechanism.