knit_meta {knitr}R Documentation

Metadata about objects to be printed

Description

As an object is printed, knitr will collect metadata about it (if available). After knitting is done, all the metadata is accessible via this function. You can manually add metadata to the knitr session via knit_meta_add().

Usage

knit_meta(class = NULL, clean = TRUE)

knit_meta_add(meta, label = "")

Arguments

class

optionally return only metadata entries that inherit from the specified class; the default, NULL, returns all entries.

clean

whether to clean the collected metadata; by default, the metadata stored in knitr is cleaned up once retrieved, because we may not want the metadata to be passed to the next knit() call; to be defensive (i.e. not to have carryover metadata), you can call knit_meta() before knit()

meta

a metadata object to be added to the session

label

a chunk label to indicate which chunk the metadata belongs to

Value

knit_meta() returns the matched metadata specified by class; knit_meta_add() returns all current metadata.


[Package knitr version 1.15.20 Index]