Learn R Programming

simFrame (version 0.2)

accessors: Accessor and mutator functions for objects

Description

Get values of slots of objects via accessor functions and set values via mutator functions. If no mutator methods are available, the slots of the corresponding objects are not supposed to be changed by the user.

Usage

getAdd(x)

getAux(x) setAux(x, aux)

getCall(x)

getCollect(x) setCollect(x, collect)

getColnames(x) setColnames(x, colnames)

getContControl(x) setContControl(x, contControl)

getDesign(x) setDesign(x, design)

getDistribution(x) setDistribution(x, distribution)

getDots(x) setDots(x, dots)

getEpsilon(x) setEpsilon(x, epsilon)

getFun(x) setFun(x, fun)

getGrouping(x) setGrouping(x, grouping)

getIndices(x)

getIntoContamination(x) setIntoContamination(x, intoContamination)

getK(x) setK(x, k)

getLegend(x)

getNAControl(x) setNAControl(x, NAControl)

getNArate(x) setNArate(x, NArate)

getNr(x)

getProb(x) setProb(x, prob)

getSAE(x) setSAE(x, SAE)

getSeed(x)

getSize(x) setSize(x, size)

getSplit(x)

getTarget(x) setTarget(x, target)

getValues(x)

Arguments

x
an object.
aux
a character string specifying an auxiliary variable (see "ContControl" and "NAControl").
collect
a logical indicating whether groups should be collected after sampling individuals or sampled directly (see "SampleControl").
colnames
a character vector specifying column names (see "DataControl").
contControl
an object of class "ContControl" (see "SimControl").
design
a character vector specifying columns to be used for stratification (see "SampleControl" and "SimControl").
distribution
a function generating data (see "DataControl" and "DCARContControl").
dots
additional arguments to be passed to a function (see "DataControl", "DARContControl" and "DCARContControl").
epsilon
a numeric vector giving contamination levels (see "VirtualContControl").
fun
a function (see "DARContControl", "SampleControl" and "SimControl").
grouping
a character string specifying a grouping variable (see "ContControl", "NAControl" and "SampleControl").
intoContamination
a logical indicating whether missing values should also be inserted into contaminated observations (see "NAControl").
k
a single positive integer giving the number of samples to be set up (see "VirtualSampleControl").
NAControl
an object of class "NAControl" (see "SimControl").
NArate
a numeric vector or matrix giving missing value rates (see "VirtualNAControl").
prob
a numeric vector giving probability weights (see "SampleControl").
SAE
a logical indicating whether small area estimation will be used in the simulation experiment (see "SimControl").
size
a non-negative integer or a vector of non-negative integers (see "DataControl" and "SampleControl").
target
a character vector specifying target columns (see "VirtualContControl" and "VirtualNAControl").

Value

  • For accessor functions, the corresponding slot of x is returned. For mutator functions, the corresponding slot of x is replaced.

Examples

Run this code
nc <- NAControl(NArate = 0.05)
getNArate(nc)

setNArate(nc, c(0.01, 0.03, 0.05, 0.07, 0.09))
getNArate(nc)

Run the code above in your browser using DataLab