multiParts: multiParts

Description Usage Arguments Details Author(s) Examples

Description

This function splits a vector into several parts depends on the proportions provided.

Usage

1

Arguments

y

vector. to be splited.

p

numeric vector. The proportion of each parts.

Details

By calling 'sample' function with 'replace=FALSE', the provided vector can be splited into different proportion which follows the proportion provided. Row number will be returned for each proportion in list.

Author(s)

Sixiang Hu

Examples

1
multiParts(1:100,c(0.25,0.25,0.5))

SixiangHu/DataMan documentation built on May 9, 2019, 1:48 p.m.