length-methods: Methods for getting the length of an object

Description Usage Arguments Value Methods Author(s) See Also Examples

Description

Get the length of an object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'SampleSetup'
length(x)

## S4 method for signature 'VirtualContControl'
length(x)

## S4 method for signature 'VirtualNAControl'
length(x)

## S4 method for signature 'VirtualSampleControl'
length(x)

Arguments

x

an object.

Value

An integer giving the length of the object. See the “Methods” section below for details.

Methods

signature(x = "SampleSetup")

get the number of set up samples.

signature(x = "VirtualContControl")

get the number of contamination levels to be used.

signature(x = "VirtualNAControl")

get the number of missing value rates to be used (the length in case of a vector in slot NArate or the number of rows in case of a matrix).

signature(x = "VirtualSampleControl")

get the number of samples to be set up.

Author(s)

Andreas Alfons

See Also

length

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## load data
data(eusilcP)

## class "SampleSetup"
# set up samples using group sampling
set <- setup(eusilcP, grouping = "hid", size = 1000, k = 50)
summary(set)
length(set)

## class "ContControl"
cc <- ContControl(target = "eqIncome", 
    epsilon = c(0, 0.0025, 0.005, 0.0075, 0.01), 
    dots = list(mean = 5e+05, sd = 10000))
length(cc)

## class "NAControl"
nc <- NAControl(target = "eqIncome", NArate = c(0.1, 0.2, 0.3))
length(nc)

aalfons/simFrame documentation built on Nov. 27, 2021, 7:51 a.m.