xpssSample: Creates a sample

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

View source: R/xpssSample.R

Description

R Implementation of the SPSS SAMPLE argument. Takes a sample from a xpssFrame object, data frame or matrix.

Usage

1
xpssSample(x, pct = NULL, n = NULL, from = NULL)

Arguments

x

a (non-empty) data.frame or input data of class "xpssFrame".

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.

Details

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.

Value

Returns a subset of the actual dataset.

Author(s)

Andreas Wygrabek

See Also

sample

Examples

1
2
3

translateSPSS2R documentation built on May 30, 2017, 4:31 a.m.