Learn R Programming

qreport (version 1.0-1)

addCap: addCap

Description

Add Figure Captions to a Dataset

Usage

addCap(label = NULL, cap = NULL, scap = NULL)

Value

invisible list with label, cap, scap

Arguments

label

figure label to use if not fetched from chunk information

cap

caption to use if not from chunk

scap

short caption to use if not from chunk

Author

Frank Harrell

Details

Fetches the figure caption and optional short caption from the currently running code chunk (under knitr) and appends them to a running caption dataset named .captions. in the global environment. This facilites customizing a table of figures in a report.

Examples

Run this code
if (FALSE) {
# Called from inside a knitr chunk and all information pulled from
# chunk information
addCap()
}

Run the code above in your browser using DataLab