Rdocumentation
powered by
Learn R Programming
dostats (version 1.2.0)
make_new_id: Make a helper ID counter
Description
This creates an object that counts how many ID's have been created.
Usage
make_new_id(startat = 0)
Arguments
startat
The base number to start counting at, ie. th enumber before the first ID.
Details
The object is a list of three elements, each a function.
$new(n=1)
get the next
n
id numbers.
$reset(at=0)
reset the the chain to
at
, next ID number will be
at+!
.
$curr()
what was the last ID number issued.