rmarkdown_setup: Rmarkdown Page and Column Setup, and Line Breaks!

Description Usage Arguments Details Note

Description

Changing the page size and adding two column support for HTML RMarkdown documents is relatively easy but requires either altering an external .html file or a fair bit of typing in your .Rmd file. These functions make it easier to add these supports, fine-tuned to each .Rmd file.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
setup2cols(left = 50, right = 50)

begin_left()

begin_right()

end_left()

end_right()

setup_pagewidth(width = 1700)

br(n = 1)

Arguments

left

Integer, percent of the page width to devote to the left column, default is 50

right

Integer, percent of the page width to devote to the right column, default is 50

width

Integer, page width in px

n

Integer, number of line breaks to include, deafult is 1

Details

To use these functions put setup2cols() and/or setup_pagewidth() in a r chunk with the option results='asis' at the beginning of your document. Then, when you want column output, make another r chunk (also with results='asis') and surround your desired output with begin_left() and end_left(). These functions were designed to be used with a for loop, hence why results='hold' is not used.

Note

To use ggplot objects with begin_left() and begin_right() pass them through plot(). To use kable objects pass them through htmltools::knit_print.html().


joshua-ruf/fidelis documentation built on July 20, 2019, 1:56 a.m.