R: Creates new randomized IDs

createNewID {sdcMicro} | R Documentation

## 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)

### 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.

### Value

an `sdcMicroObj-class`-object with updated slot `origData`

[Package sdcMicro version 5.6.1 Index]