R: subsetMicrodata

subsetMicrodata {sdcMicro} | R Documentation

## subsetMicrodata

### Description

allows to restrict original data to only a subset. This may be useful to test some anonymization methods. This function will only be used in the graphical user interface `sdcApp`.

### Usage

    subsetMicrodata(obj, type, n)

### Arguments

`obj` | an object of class `data.frame` containing micro data
`type` | algorithm used to sample from original microdata. Currently supported choices are `n_perc` the restricted microdata will be a `n-percent` sample of the original microdata. `first_n` only the first `n` observations will be used. `every_n` the restricted microdata set consists of every `n-th` record. `size_n` a total of `n` observations will be randomly drawn.
`n` | numeric vector of length 1 specifying the specific parameter with respect to argument `type`.

### Value

an object of class `sdcMicroObj-class` with modified slot `@origData`.

### Author(s)

Bernhard Meindl

[Package sdcMicro version 5.6.1 Index]