Learn R Programming

simFrame (version 0.1.2)

SampleControl-class: Class "SampleControl"

Description

Class for controlling the setup of samples.

Arguments

Objects from the Class

Objects can be created by calls of the form new("SampleControl", ...) or SampleControl(...).

Details

There are some restrictions on the argument names of the function supplied to method. If it needs population data as input, the corresponding argument should be called x and should expect a data.frame. If the sampling method only needs the population size as input, the argument should be called N. Note that method is not expected to have both x and N as arguments, and that the latter is much faster for stratified sampling or group sampling. Furthermore, if the function has arguments for sample size and probability weights, they should be called size and prob, respectively. Note that a function with prob as its only argument is perfectly valid (for probability proportional to size sampling). Further arguments of method may be supplied as a list via the slot dots.

Extends

Class "VirtualSampleControl", directly.

See Also

VirtualSampleControl, SampleSetup, setup, draw

Examples

Run this code
showClass("SampleControl")

Run the code above in your browser using DataLab