Skip to contents

Add images which are not auto-generated during the knitting process to all publishing formats. Images can now be saved in any format compatible with Whitehall Publisher (png or svg), and with any meaningful file name.

Usage

add_image(file_name, folder = "graphs")

Arguments

file_name

string giving the file name of the image (either png or svg)

folder

string giving the directory the image is stored in, defaults to "graphs".

Value

A plain text string which embeds the specified image into any output format

Examples

if (FALSE) { # \dontrun{
##Image in default folder (graphs)
add_image("rail_usage_infographic.svg")

##Image in different folder
add_image("rail_usage_infographic.svg", folder = "img")
} # }