knitr (version 0.1)

fig_path: Path for figure files

Description

The filename of figure files is the combination of options fig.path and label. This function returns the path of figures for the current chunk by default.

Usage

fig_path(suffix = "", options = opts_current$get())

Arguments

suffix
a suffix of the filename
options
a list of options; by default the options of the current chunk

Value

  • A character string (path)

Examples

Run this code
fig_path(".pdf", list(fig.path = "figure/abc-", label = "first-plot"))
fig_path(1:10, list(fig.path = "foo-", label = "bar"))

Run the code above in your browser using DataCamp Workspace