Last data update: 2014.03.03

R: Coalitions
coalitionsR Documentation

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

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

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(InventorymodelPackage)
Loading required package: e1071
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/InventorymodelPackage/coalitions.Rd_%03d_medium.png", width=480, height=480)
> ### Name: coalitions
> ### Title: Coalitions
> ### Aliases: coalitions
> 
> ### ** Examples
> 
> coalitions(3)
$Binary
     [,1] [,2] [,3]
[1,]    0    0    0
[2,]    1    0    0
[3,]    0    1    0
[4,]    0    0    1
[5,]    1    1    0
[6,]    1    0    1
[7,]    0    1    1
[8,]    1    1    1

$Classic
[1]   0   1   2   3  12  13  23 123

> #$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
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>