Learn R Programming

CoopGame (version 0.2.2)

cardinalityGame: Construct a cardinality game

Description

Create a list containing all information about a specified cardinality game: For a cardinality game the worth of each coalition is simply the number of the members of the coalition.

Usage

cardinalityGame(n)

Arguments

n

represents the number of players

Value

A list with two elements representing the cardinality game (n, Game vector v)

Examples

Run this code
# NOT RUN {
library(CoopGame)
cardinalityGame(n=3)

# }
# NOT RUN {
library(CoopGame)
#Example: Cardinality function for four players
(vv<-cardinalityGame(n=4))
#$n
#[1] 4

#$v
#[1] 1 1 1 1 2 2 2 2 2 2 3 3 3 3 4
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab