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.
  1. $new(n=1)get the nextnid numbers.
  2. $reset(at=0)reset the the chain toat, next ID number will beat+!.
  3. $curr()what was the last ID number issued.