make_kp | R Documentation |

This function ...

make_kp(n, np, pb, k, p) ## S4 method for signature 'numeric,numeric,numeric,numeric,numeric' make_kp(n, np, pb, k, p) ## S4 method for signature 'numeric,numeric,missing,numeric,numeric' make_kp(n, np, pb, k, p)

`n` |
Number of vertices (population size) |

`np` |
numeric vector setting ids for the newborn (i.e. which individual will be replaced with a new one) and a parent(s). Length 2 or 3. If you want to randomly select an id for the newborn (first value) and parents (second and third value), simply use c(0,0) or c(0,0,0). |

`pb` |
Probability to connect to parent (default is 1) |

`k` |
Degree (number of connections a new individual will form) |

`p` |
Maximum proportion of k that will be connections to neighbours of the parent. The complimentary k*(1-p) connections will be formed with random other individuals |

It is important to note that ... P is a maximum value, say an individual wants to have 10 connections and P=0.5, i.e. it wants 5 connections to the neighbours of its parent but the parent only has 4 then it will only inherit those 4.

Returns an unweighed (binary) adjacency matrix, where each cell represents the presence (1) or absence (0) of an interaction between the row and the column individual.

make_kp(n = 10, np = c(0,0), pb = 1, k = 4, p = .5)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.