subsets: All possible subsets

View source: R/misc-functions.R

subsetsR Documentation

All possible subsets

Description

This function returns all possible subsets of a given set.

Usage

subsets(n, k, set = 1:n)

Arguments

n

the size of the set of which subsets will be computed

k

the size of the subsets

set

an optional vector to be taken as the set

Details

This function returns all possible subsets of a given set.

Value

A matrix with subsets listed in its rows


msalibian/sparseFPCA documentation built on Nov. 26, 2022, 4:47 a.m.