Learn R Programming

sdcMicro (version 5.6.1)

createNewID: Creates new randomized IDs

Description

This is useful if the record IDs consist, for example, of a geo identifier and the household line number. This method can be used to create new, random IDs that cannot be reconstructed.

Usage

createNewID(obj, newID, withinVar)

Value

an sdcMicroObj-class-object with updated slot origData

Arguments

obj

an sdcMicroObj-class-object

newID

a character specifiying the desired variable name of the new ID

withinVar

if not NULL a character vector specifying a variable (e.g an existing household ID) which will be used when calculating the new IDs. If specified, the same IDs will be assigned to the same values of the given variable.