R6ClassCount: R6 Class representing object counts in documents

Description Usage Format Fields Public methods Examples

Description

Simple counter of objects inside a document. Objects that associated to such a counter can be sections, tables, diagrams and others. Specialised counter classes for the different document objects can be derived from this more generic counter class. Specific document objects that are associated to a counter are generated using the prefix field in this class.

Usage

1

Format

An object of class R6ClassGenerator of length 24.

Fields

prefix

Text shown before counter, specifies the document object type

suffix

Test shown after the counter, corresponds to a description

count

current value of the counter

Public methods

new()

Instantiation of a new R6ClassCount object

out(ps_prefix, ps_suffix, pn_count)

Write count value with given prefix and suffix

increment_count()

Increment value of count by 1

set_prefix(ps_prefix)

Setter for field prefix

get_prefix()

Getter for field prefix

set_suffix(ps_suffix)

Setter for field suffix

get_suffix()

Getter for field suffix

set_count(pn_count)

Setter for field count

get_count()

Getter for field count

Examples

1
2
cnt <- R6ClassCount$new()
cat(cnt$out(ps_prefix = "## Task", ps_suffix="Variance components", pn_count = 1))

charlotte-ngs/rmddochelper documentation built on June 27, 2019, 1:22 a.m.