stopOnInvalidDictator: Parameter Function stopOnInvalidDictator

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

View source: R/ParameterChecks_CoopGame.R

Description

stopOnInvalidDictator checks if dictator is specified correctly in a dictator game. Validation result gets stored to object paramCheckResult in case an error occured and causes calculation to stop.

Usage

1
stopOnInvalidDictator(paramCheckResult, dictator, n = NULL)

Arguments

paramCheckResult

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

dictator

Number of the dictator

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
1090 'dictator' does not contain only one single element
1091 Representation of 'dictator' is not 'numeric'
1092 'dictator' is not element of grand coalition
1093 'dictator' is 'NULL'

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(), stopOnInvalidEstate(), stopOnInvalidGameVector(), stopOnInvalidGrandCoalitionN(), stopOnInvalidIndex(), stopOnInvalidLeftRightGloveGame(), stopOnInvalidNChooseB(), stopOnInvalidNumberOfPlayers(), stopOnInvalidNumber(), stopOnInvalidQuota(), stopOnInvalidVetoPlayer(), stopOnInvalidWeightVector(), stopOnParamCheckError()

Examples

1
2
3
4
library(CoopGame)
paramCheckResult=getEmptyParamCheckResult()
validDictator = 3
stopOnInvalidDictator(paramCheckResult,dictator=validDictator,n=3)

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