nsplit: Compute Total Number of Possible Splits

Description Usage Arguments Value Author(s) Examples

View source: R/nsplit.R

Description

nsplits returns the total number of possible splits of variables into groups.

Usage

1
nsplit(p, G, use.all = TRUE, fix.partition = NULL)

Arguments

p

Number of variables or objects to split.

G

Number of groups into which the variables are split.

use.all

Boolean variable to determine if all variables must be used (default is TRUE).

fix.partition

Optional matrix with G columns (or list if more than one value of G) indicating the partitions (in each row) to be considered for the splits.

Value

A numeric vector with the total number of possible splits.

Author(s)

Anthony-Alexander Christidis, anthony.christidis@stat.ubc.ca

Examples

1
2
3
4
5
6
7
# Compute the total number of possible splits of 6 variables into 3 groups
# We use all the variables
out.n.splits.all <- nsplit(p=6, G=3, use.all=TRUE)
out.n.splits.all
# We don't enforce using all the variables
out.n.splits <- nsplit(p=6, G=3, use.all=FALSE)
out.n.splits

splitSelect documentation built on Nov. 9, 2021, 9:07 a.m.