View source: R/phaseDiagram3S.R
phaseDiagram3S | R Documentation |
Plots phase diagram of a game with two players and three strategies.
phaseDiagram3S( A, dynamic, params = NULL, trajectories = NULL, contour = FALSE, vectorField = FALSE, strategies = c("1", "2", "3") )
A |
Numeric matrix of size 3x3 representing the number of strategies of a symmetric matrix game. |
dynamic |
Function representing an evolutionary dynamic. |
params |
Numeric vector with additional parameters for the evolutionary dynamic. |
trajectories |
Numeric matrix of size mx3. Each row represents the initial values for the trajectory to be examined. |
contour |
Logical value that handles contour diagram presentation. If
set to |
vectorField |
Logical value that handles vector field presentation. If
set to |
strategies |
String vector of length 3 that names all strategies. |
None.
Daniel Gebele dngebele@gmail.com
A <- matrix(c(0, -2, 1, 1, 0, -2, -2, 1, 0), 3, byrow=TRUE) state <- matrix(c(0.4, 0.3, 0.3), 1, 3, byrow=TRUE) phaseDiagram3S(A, Replicator, NULL, state, FALSE, FALSE) phaseDiagram3S(A, Replicator, NULL, state, TRUE, TRUE) # Plot two trajectories rather than only one: A <- matrix(c(0, -2, 1, 1, 0, -2, -2, 1, 0), 3, byrow=TRUE) state <- matrix(c(0.4, 0.3, 0.3, 0.6, 0.2, 0.2), 2, 3, byrow=TRUE) phaseDiagram3S(A, Replicator, NULL, state, FALSE, FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.