stopOnInvalidIndex: Parameter Function stopOnInvalidIndex

Description Usage Arguments Error Code Ranges Author(s) See Also Examples

View source: R/ParameterChecks_CoopGame.R

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

1
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'.
1072 Index is within the wrong range according to number of players n.

Author(s)

Jochen Staudacher jochen.staudacher@hs-kempten.de

Johannes Anwander anwander.johannes@gmail.com

See Also

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

Examples

1
2
3
4
5
library(CoopGame)
v=c(1:7)
paramCheckResult=getEmptyParamCheckResult()
validIndex = 5
stopOnInvalidIndex(paramCheckResult, index=validIndex, n=3)

CoopGame documentation built on Aug. 24, 2021, 1:07 a.m.