Learn R Programming

yamlme (version 0.1.2)

print: Print Method for rmd_doc

Description

Quick display for rmd_doc objects. This method also defines the way how objects are displayed in the console.

Usage

# S3 method for rmd_doc
print(x, maxlines = 10, ...)

Value

A display of the resulting R-Markdown document in the console.

Arguments

x

An object of class rmd_doc.

maxlines

An integer value indicating the number of lines used for the display. Longer documents will be truncated.

...

Further arguments passed among methods (not yet in use).

Examples

Run this code
## Document without header
my_document <- read_rmd(
  file = file.path(path.package("yamlme"), "taxlistjourney.Rmd"),
  skip_head = TRUE
)
my_document

## Add header using update
my_document <- update(my_document,
  title = "A journey in rOpenSci",
  author = "Miguel Alvarez",
  output = "html_document"
)
my_document

## Header only
my_document$body <- NULL
my_document

Run the code above in your browser using DataLab