| read_md | R Documentation |
read_md() imports metadata from a markdown file into the workspace as a
tibble.
read_md(file)
file |
Filename to read from. Must be either |
read_md() is unusual in that it calls rmarkdown::render() or
quarto::quarto_render() internally to ensure code blocks and snippets
are parsed correctly. This ensures dynamic content is rendered correctly in
the resulting EML document, but makes this function considerably slower
than a standard import function. Conceptually, therefore, it is closer to a
renderer with output type tibble than a traditional read_ function.
This approach has one unusual consequence; it prevents 'round-tripping' of
embedded code. That is, dynamic content in code snippets within the
metadata statement is rendered to plain text in EML. If that EML document
is later re-imported to Rmd using read_eml() and write_md(), formerly
dynamic content will be shown as plain text.
Internally, read_md() calls lightparser::split_to_tbl().
read_md() returns an object of class tbl_df, tbl and
data.frame (i.e. a tibble).
source_file <- system.file("extdata",
"bionet_metadata.Rmd",
package = "delma")
read_md(source_file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.