Description Usage Arguments Details Value Author(s) See Also Examples
R Implementation of the SPSS SAMPLE
argument. Takes a sample from a xpssFrame object, data frame or matrix.
1 | xpssSample(x, pct = NULL, n = NULL, from = NULL)
|
x |
a (non-empty) data.frame or input data of class |
pct |
atomic numeric, determines the percentage to keep. |
n |
atomic numeric, specifies the number of cases to keep. |
from |
atomic numeric, indicates the Basis for n. |
xpssSample takes a sample of the specified size from the elements of x either with or without replacement. The subset get specified by pct or n.
pct
specifies a percentage value, for the amount of data which should be kept, allowed value range is from 0.01 to 1.
n
indicates the amount of values to keep.
from
determines the basis for n. from
has to be higher then n
.
Returns a subset of the actual dataset.
Andreas Wygrabek
1 2 3 | data(fromXPSS)
xpssSample(fromXPSS, pct = 0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.