tblCap: Returns formated caption with table number

View source: R/utils.R

tblCapR Documentation

Returns formated caption with table number

Description

Returns a formatted markdown text string for the caption, which includes the table number. The function relies on options("table_number") in order to keep track of the current number. Also increases the table number BEFORE processing the caption using tblNumIncrement.

Usage

tblCap(
  caption.text=NULL,
  advance.counter=1
  )

Arguments

caption.text

Text string to be used for caption. If NULL, no caption is returned, but the table counter is advanced.

advance.counter

Numeric. Number to be added to the present table number. Default is 1, advancing table count by 1.

Examples

options(table_number=1)
tblCap("My table caption is great.")

# Returns ' **Table 2:**  My table caption is great. '

getOption("table_number")
# Returns '2'

CenterForAssessment/Literasee documentation built on July 2, 2023, 6:21 p.m.