Package 'rmdutil'

Title: Utility functions for RMarkdown
Description: Helper functions to simplify writing of RMarkdown documents. Simplifies inclusion of graphics.
Authors: Gunther Krauss
Maintainer: Gunther Krauss <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2025-01-26 04:41:41 UTC
Source: https://github.com/gk-crop/rmdutil

Help Index


Includes a graphic into a RMarkdown document

Description

Graphs created in a loop or by some packages like Diagrammer are not always automatically included in the final document produced from a RMarkdown document. This function helps including graphics in documents.

Usage

## S3 method for class 'grViz'
includeGraphic(gr, nr = 0)

## S3 method for class 'dgr_graph'
includeGraphic(gr, nr = 0)

includeGraphic(gr, nr = 0)

## Default S3 method:
includeGraphic(gr, nr = 0)

Arguments

gr

graph

nr

optional number when creating more than one graph in a chunk


Utility functions to simplify creation of RMarkdown-Documents

Description

Functions to:

  • Include graphs created by a loop into documents

  • Include DiagrammeR graphs in PDF


Includes graphs produced in a loop into final document

Description

When producing graphics within a loop, only the last graph will be included by default. When calling this function, the graph is printed. If withBlanLine is TRUE, then a blank line is printed, causing the creation of figure environments.

Usage

showGraph(gr, withBlankLine = TRUE)

Arguments

gr

graph

withBlankLine

if TRUE, then a blank line is printed


Starts a special LaTeX environment

Description

Some environments like align must not be included within ⁠$$⁠..⁠$$⁠ when creating a PDF. For Word documents, however, the ⁠$$⁠ are needed.

Usage

texEnv()