Learn R Programming

captioner (version 2.2.3)

bump: Captioner bump function

Description

For figure numbers with sub-values (e.g. 1.1), increment one of the sub-values for use in the next figure.

Usage

bump(cap_fun, level)

Arguments

cap_fun
The captioner function that needs to be bumped
level
Numeric indicating which sub-number should be incremented

Value

None.

Details

Normally captioner only increments the final number in your figure number, even if you have hierarchical numbering (e.g. Fig 1.1.1). This function will bump up any of the penultimate numbers of your choice using a given index. You can use it at the start of a section, for example, to shift from Fig 1.5 to Fig 2.1.

See Also

captioner

Examples

Run this code
figs <- captioner(levels = 2)
figs("a")

bump(figs, 1)

Run the code above in your browser using DataLab