nsplit {splitSelect}R Documentation

Compute Total Number of Possible Splits

Description

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

Usage

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

# 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


[Package splitSelect version 1.0.3 Index]