| p2p_data_sim {vivainsights} | R Documentation |
Simulate a person-to-person query using a Watts-Strogatz model
Description
Generate an person-to-person query / edgelist based on the graph
according to the Watts-Strogatz small-world network model. Organizational
data fields are also simulated for Organization, LevelDesignation, and
City.
Usage
p2p_data_sim(dim = 1, size = 300, nei = 5, p = 0.05)
Arguments
dim |
Integer constant, the dimension of the starting lattice. |
size |
Integer constant, the size of the lattice along each dimension. |
nei |
Integer constant, the neighborhood within which the vertices of the lattice will be connected. |
p |
Real constant between zero and one, the rewiring probability. |
Details
This is a wrapper around igraph::watts.strogatz.game(). See igraph
documentation for details on methodology. Loop edges and multiple edges are
disabled. Size of the network can be changing the arguments size and nei.
Value
data frame with the same column structure as a person-to-person flexible
query. This has an edgelist structure and can be used directly as an input
to network_p2p().
See Also
Other Data:
g2g_data,
mt_data,
p2p_data,
pq_data
Other Network:
g2g_data,
network_g2g(),
network_p2p(),
network_summary(),
p2p_data
Examples
# Simulate a p2p dataset with 800 edges
p2p_data_sim(size = 200, nei = 4)