Learn R Programming

CoopGame (version 0.2.2)

stopOnInvalidIndex: Parameter Function stopOnInvalidIndex

Description

stopOnInvalidIndex checks if coalition function (in the form of either v or A) is specified correctly and causes causes calculation to stop otherwise.

Usage

stopOnInvalidIndex(paramCheckResult, index, n = NULL)

Arguments

paramCheckResult

list object for check result with list element 'errCode' for the error code and 'errMessage' for the error message.

index

index which is checked to be a valid index

n

represents the number of players

Error Code Ranges

Error codes and messages shown to user if error on parameter check occurs

Error Code Message 1070
Index is 'NULL'. 1071 Index is 'not numeric'.

See Also

Other ParameterChecks_CoopGame: getEmptyParamCheckResult(), stopOnInconsistentEstateAndClaimsVector(), stopOnInvalidAllocation(), stopOnInvalidBoolean(), stopOnInvalidClaimsVector(), stopOnInvalidCoalitionS(), stopOnInvalidDictator(), stopOnInvalidEstate(), stopOnInvalidGameVector(), stopOnInvalidGrandCoalitionN(), stopOnInvalidLeftRightGloveGame(), stopOnInvalidNChooseB(), stopOnInvalidNumberOfPlayers(), stopOnInvalidNumber(), stopOnInvalidQuota(), stopOnInvalidVetoPlayer(), stopOnInvalidWeightVector(), stopOnParamCheckError()

Examples

Run this code
# NOT RUN {
library(CoopGame)
v=c(1:7)
paramCheckResult=getEmptyParamCheckResult()
validIndex = 5
stopOnInvalidIndex(paramCheckResult, index=validIndex, n=3)

# }

Run the code above in your browser using DataLab