Learn R Programming

CoopGame (version 0.2.2)

getNumberOfPlayers: Get number of players

Description

Gets the number of players from a game vector

Usage

getNumberOfPlayers(v)

Arguments

v

Numeric vector of length 2^n - 1 representing the values of the coalitions of a TU game with n players

Value

Number of players in the game (specified by game vector v)

Examples

Run this code
# NOT RUN {
library(CoopGame)
maschlerGame=c(0,0,0,60,60,60,72)
getNumberOfPlayers(maschlerGame)

# }

Run the code above in your browser using DataLab