randomly_assign: Assigns n samples into k groups

Description Usage Arguments Value Author(s) Examples

Description

Assigns n samples into k groups

Usage

1

Arguments

n

sample size

k

number of groups

Value

returns a vector of length n with a random assignment of entries from 1 to k

Author(s)

Ben Sherwood <[email protected]>

Examples

1
2
3
n <- 100
folds_10 <- randomly_assign(n,10)
folds_5 <- randomly_assign(n,5)

roccv documentation built on May 10, 2019, 5:03 p.m.