Description Usage Arguments Value Methods Author(s) References See Also Examples
Return the first parts of an object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## S4 method for signature 'SampleSetup'
head(x, k = 6, n = 6, ...)
## S4 method for signature 'SimControl'
head(x)
## S4 method for signature 'SimResults'
head(x, ...)
## S4 method for signature 'Strata'
head(x, ...)
## S4 method for signature 'VirtualContControl'
head(x)
## S4 method for signature 'VirtualDataControl'
head(x)
## S4 method for signature 'VirtualNAControl'
head(x)
## S4 method for signature 'VirtualSampleControl'
head(x)
|
x |
an object. |
k |
for objects of class |
n |
for objects of class |
... |
additional arguments to be passed down to methods. |
An object of the same class as x, but in general smaller. See the
“Methods” section below for details.
signature(x = "SampleSetup")returns the first parts of set up
samples. The first n indices of each of the first k set up
samples are kept.
signature(x = "SimControl")currently returns the object itself.
signature(x = "SimResults")returns the first parts of
simulation results. The method of head for the
data.frame in slot values is thereby called.
signature(x = "Strata")returns the first parts of strata
information. The method of head for the vector in
slot values is thereby called and the slots split and
size are adapted accordingly.
signature(x = "VirtualContControl")currently returns the object itself.
signature(x = "VirtualDataControl")currently returns the object itself.
signature(x = "VirtualNAControl")currently returns the object itself.
signature(x = "VirtualSampleControl")currently returns the object itself.
Andreas Alfons
Alfons, A., Templ, M. and Filzmoser, P. (2010) An Object-Oriented Framework for Statistical Simulation: The R Package simFrame. Journal of Statistical Software, 37(3), 1–36. doi: 10.18637/jss.v037.i03.
head, "SampleSetup",
"SimResults", "Strata"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## load data
data(eusilcP)
## class "SampleSetup"
# set up samples using group sampling
set <- setup(eusilcP, grouping = "hid", size = 1000, k = 50)
summary(set)
# get the first 10 indices of each of the first 5 samples
head(set, k = 5, n = 10)
## class "Strata"
# set up samples using group sampling
strata <- stratify(eusilcP, "region")
summary(strata)
# get strata information for the first 10 observations
head(strata, 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.