sampleColumns: Returns a subset of data-frame or matrix

Description Usage Arguments Value Author(s) See Also Examples

View source: R/sampleColumns.R

Description

Returns a random subset of columns of a data-frame or matrix

Usage

1
sampleColumns(origData, Seed = 1, sampleSize, replaceBoolean = FALSE)

Arguments

origData

A matrix object or a data-frame

Seed

To randomize, specify any Seed you desire

sampleSize

The number of columns to sample, from the original dataset

replaceBoolean

Whether to sample with replacement or not. Default is FALSE

Value

Returns an object of same type as original dataset, with sampled columns

Author(s)

Subhrangshu Nandi, PhD Statistics, UW Madison; snandi@wisc.edu or nands31@gmail.com

See Also

sample, subset, sampleRows

Examples

1
2
data( LifeCycleSavings )
sampleRows( LifeCycleSavings, Seed = 1, sampleSize = 10, FALSE )

snandi/RFunctionsSN documentation built on May 30, 2019, 5:04 a.m.