Skip to contents

Sets the sprintf template used to mint and detect placeholder IDs for unknown parents (see addUIds). The format must have a non-empty literal prefix before its first "%" (used for detection) and must consume a single integer (used for generation), e.g. "U%04d" or "AUTO%05d". The setting is stored in options(nprcgenekeepr.autoIdFormat=) and read by getAutoIdFormat.

Usage

setAutoIdFormat(format)

Arguments

format

A single character string: the auto-ID sprintf format.

Value

The previous format, returned invisibly.

Examples

old <- setAutoIdFormat("AUTO%05d")
getAutoIdFormat()
#> [1] "AUTO%05d"
setAutoIdFormat(old) # restore