Learn R Programming

delma (version 0.1.2)

use_metadata_template: Write an example metadata statement to disk

Description

This function places a metadata template at the address specified by "file", defaulting to "metadata.Rmd" in the working directory. The template is built in such a way that standard rendering with rmarkdown or Quarto to HTML or PDF will function; but also that it renders to valid EML when processed using read_md() and write_eml().

Usage

use_metadata_template(file = NULL, overwrite = FALSE, quiet = FALSE)

Value

Doesn't return anything to the workspace; called for the side-effect of placing a metadata statement in the working directory.

Arguments

file

(string) A name for the resulting file, with either .Rmd or .qmd as a suffix. If NULL will default to metadata.md.

overwrite

(logical) Should any existing file be overwritten? Defaults to FALSE.

quiet

(logical) Should messages be suppressed? Defaults to FALSE.

Examples

Run this code
# \dontshow{
.old_wd <- setwd(tempdir())
# }
use_metadata_template("example.Rmd") 
# \dontshow{
setwd(.old_wd)
# }

Run the code above in your browser using DataLab