permute: Permute

Description Usage Arguments Value Examples

View source: R/dse2.R

Description

Return matrix with rows indicating all possible selections of elements from seq(M). 0 in the result indicates omit. M is usually a positive integer. M=0 gives NULL. Neg. M give -permute(abs(M)).

Usage

1
    permute(M)

Arguments

M

An integer.

Value

A matrix.

Examples

1
    permute(4)

Example output

Loading required package: tfplot
Loading required package: tframe

Attaching package: 'dse'

The following objects are masked from 'package:stats':

    acf, simulate

      [,1] [,2] [,3] [,4]
 [1,]    0    2    3    4
 [2,]    1    2    3    4
 [3,]    0    0    3    4
 [4,]    1    0    3    4
 [5,]    0    2    0    4
 [6,]    1    2    0    4
 [7,]    0    0    0    4
 [8,]    1    0    0    4
 [9,]    0    2    3    0
[10,]    1    2    3    0
[11,]    0    0    3    0
[12,]    1    0    3    0
[13,]    0    2    0    0
[14,]    1    2    0    0
[15,]    0    0    0    0
[16,]    1    0    0    0

dse documentation built on March 4, 2020, 3:01 a.m.