split_into_n: Split a vector x into a list of n

Description Usage Arguments Examples

Description

This function is pretty useful to use together with parallel computing, e.g. when using clusterApply

Usage

1
split_into_n(xx, n)

Arguments

xx

a vector to be split

n

# of group we want xx to be split into

Examples

1
2
split_into_n(1:100,10)
split_into_n(letters[1:20],3)

mucun1988/cm documentation built on May 5, 2019, 8:02 p.m.