Quick display for rmd_doc
objects. This method also defines the way how
objects are displayed 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
## Document without header
my_document <- read_rmd(
file = file.path(path.package("yamlme"), "taxlistjourney.Rmd"),
skip_head = TRUE
)
my_document
#> ---
#> # No header in this document!
#> ---
#>
#>
#> After a long review process, where a lot of improvements have been implemented,
#> the package [`taxlist`](https://docs.ropensci.org/taxlist/) managed to be
#> accepted in [**rOpenSci**](https://ropensci.org/).
#> The package `taxllist` handles taxonomic lists as **S4** objects in
#> [**R**](https://www.r-project.org/).
#> Such objects can be used as modules within data sets of biodiversity records as
#> in the package [`vegtable`](https://github.com/kamapu/vegtable).
#>
#> In a brief talk a summary of the experiences during the process of submission to
#>
#> [...truncated]
## Add header using update
my_document <- update(my_document,
title = "A journey in rOpenSci",
author = "Miguel Alvarez",
output = "html_document"
)
my_document
#> ---
#> title: A journey in rOpenSci
#> author: Miguel Alvarez
#> output: html_document
#> ---
#>
#>
#> After a long review process, where a lot of improvements have been implemented,
#> the package [`taxlist`](https://docs.ropensci.org/taxlist/) managed to be
#> accepted in [**rOpenSci**](https://ropensci.org/).
#> The package `taxllist` handles taxonomic lists as **S4** objects in
#> [**R**](https://www.r-project.org/).
#> Such objects can be used as modules within data sets of biodiversity records as
#> in the package [`vegtable`](https://github.com/kamapu/vegtable).
#>
#> In a brief talk a summary of the experiences during the process of submission to
#>
#> [...truncated]
## Header only
my_document$body <- NULL
my_document
#> ---
#> title: A journey in rOpenSci
#> author: Miguel Alvarez
#> output: html_document
#> ---
#>