
Last chance! 50% off unlimited learning
Sale ends in
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.
stopOnInvalidDictator(paramCheckResult, dictator, n = NULL)
list object for check result with list element 'errCode' for the error code and 'errMessage' for the error message.
Number of the dictator
represents the number of players
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 | Error Code |
Other ParameterChecks_CoopGame:
getEmptyParamCheckResult()
,
stopOnInconsistentEstateAndClaimsVector()
,
stopOnInvalidAllocation()
,
stopOnInvalidBoolean()
,
stopOnInvalidClaimsVector()
,
stopOnInvalidCoalitionS()
,
stopOnInvalidEstate()
,
stopOnInvalidGameVector()
,
stopOnInvalidGrandCoalitionN()
,
stopOnInvalidIndex()
,
stopOnInvalidLeftRightGloveGame()
,
stopOnInvalidNChooseB()
,
stopOnInvalidNumberOfPlayers()
,
stopOnInvalidNumber()
,
stopOnInvalidQuota()
,
stopOnInvalidVetoPlayer()
,
stopOnInvalidWeightVector()
,
stopOnParamCheckError()
# NOT RUN {
library(CoopGame)
paramCheckResult=getEmptyParamCheckResult()
validDictator = 3
stopOnInvalidDictator(paramCheckResult,dictator=validDictator,n=3)
# }
Run the code above in your browser using DataLab