Learn R Programming

InventorymodelPackage (version 1.0.2)

coalitions: Coalitions

Description

Possible coalitions with n players.

Usage

coalitions(n)

Arguments

n
Number of players

Value

This function gives the coalitions in a binary mode and usual way.

Examples

Run this code
coalitions(3)
#$Binary
#    P1 P2 P3
#0    0  0  0
#1    1  0  0
#2    0  1  0
#3    0  0  1
#12   1  1  0
#13   1  0  1
#23   0  1  1
#123  1  1  1
#
#$Classic
#[1]   0   1   2   3  12  13  23 123

Run the code above in your browser using DataLab