normalTexGame: TeX output of a game

Description Usage Arguments Value Examples

Description

Creates a normal form representation of a game and exports it in LaTeX format. Can also display pure strategy Nash equilibria as well as solutions adapted to each type of game. By default, exports to console, but can also write to a TeX file to be included in a larger document. Make sure to include \usepackage{multirow} and \usepackage{graphicx} in the preamble of the TeX document.

Usage

1
2
normalTexGame(game, showOutput = TRUE, showNash = FALSE, showSol = FALSE,
  fileOut = FALSE, tableEnv = T)

Arguments

game

An object of class "Game"

showOutput

A boolean to output the text to console. Overridden by fileOut. Defaults to TRUE.

showNash

A boolean to switch on underlining of pure strategy Nash equilibria. Defaults to FALSE.

showSol

A boolean to output the solution text. Defaults to FALSE.

fileOut

A boolean to write directly to a TeX file. Defaults to FALSE. If showSol is TRUE, the solution is outputted to a separate file.

tableEnv

A boolean to include the output in a table environment.

Value

A character vector with each cell being one line of the TeX code which can be outputted with writeLines(). By default, the output is printed directly to the console.

Examples

1
2
3
example_game <- nashGame(4,3,0,30)
normalTexGame(example_game, showNash = TRUE)
normalTexGame(example_game, showSol = TRUE, fileOut = TRUE)

Extreme-Mildness/GT.Tools documentation built on May 3, 2019, 8:31 p.m.