random_group: Random index generator for data splitting

Description Usage Arguments Value

Description

random_group randomly splits a vector of indices (defined by the number of lines of a dataset) into subgroups.

Usage

1
random_group(n, probs)

Arguments

n

Total number of indices to be splitted into smaller groups.

probs

A named vector of probabilities defining the names and proportions of indices defining each subgroup.

Value

A character vector of size n in which each entry contains the name of one of the subgroups defined in the probs vector.


astamm/fdahotelling documentation built on May 10, 2019, 2:05 p.m.