Description Usage Arguments Error Code Ranges Author(s) See Also Examples
View source: R/ParameterChecks_CoopGame.R
stopOnInvalidGameVector checks if game vector v is specified correctly. Validation result gets stored to object paramCheckResult in case an error occured and causes calculation to stop.
1 | stopOnInvalidGameVector(paramCheckResult, v, n = NULL)
|
paramCheckResult |
list object for check result with list element 'errCode' for the error code and 'errMessage' for the error message. |
v |
Numeric vector of length 2^n - 1 representing the values of the coalitions of a TU game with n players |
n |
represents the number of players |
Error codes and messages shown to user if error on parameter check occurs
| Error Code | Message |
| 1000 | Game vector is invalid as 'NULL' |
| 1001 | Number of elements in game vector is invalid |
| 1002 | Type of game vector is not numeric |
| 1003 | Game vector has different number of players than n |
| 1004 | Null game specified, value for every player is 0 |
Jochen Staudacher jochen.staudacher@hs-kempten.de
Johannes Anwander anwander.johannes@gmail.com
Other ParameterChecks_CoopGame:
getEmptyParamCheckResult(),
stopOnInconsistentEstateAndClaimsVector(),
stopOnInvalidAllocation(),
stopOnInvalidBoolean(),
stopOnInvalidClaimsVector(),
stopOnInvalidCoalitionS(),
stopOnInvalidDictator(),
stopOnInvalidEstate(),
stopOnInvalidGrandCoalitionN(),
stopOnInvalidIndex(),
stopOnInvalidLeftRightGloveGame(),
stopOnInvalidNChooseB(),
stopOnInvalidNumberOfPlayers(),
stopOnInvalidNumber(),
stopOnInvalidQuota(),
stopOnInvalidVetoPlayer(),
stopOnInvalidWeightVector(),
stopOnParamCheckError()
1 2 3 | library(CoopGame)
validGameVector=c(0,0,0,60,60,60,72)
stopOnInvalidGameVector(paramCheckResult,validGameVector)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.