Last data update: 2014.03.03

R: Specify Rmarkdown document metadata
helpersR Documentation

Specify Rmarkdown document metadata

Description

Helper functions for including metadata in the document header.

Usage

doc_date()
pkg_ver(pkg)

Arguments

pkg

character(1), package name

Details

Use doc_date to include document compilation date in the document metadata field 'date', and pkg_ver for package version specification in the 'package' field.

Value

Markdown-formatted character string.

Author(s)

Andrzej Ole<c3><85><c2><9b> <andrzej.oles@embl.de>, 2014-2015

Examples


## current date
doc_date()

## package name with version
pkg_ver("BiocStyle")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(BiocStyle)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/BiocStyle/helpers.Rd_%03d_medium.png", width=480, height=480)
> ### Name: helpers
> ### Title: Specify Rmarkdown document metadata
> ### Aliases: doc_date pkg_ver
> ### Keywords: manip
> 
> ### ** Examples
> 
> 
> ## current date
> doc_date()
[1] "5 July 2016"
> 
> ## package name with version
> pkg_ver("BiocStyle")
[1] "BiocStyle 2.0.2"
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>