sim_deg_conn: Adjacency matrix simulation - varying connectedness

Description Usage Arguments Value Examples

View source: R/sim_adjacency.R

Description

sim_deg_conn creates a randomly generated undirected- unweighted- adjacency matrix with different degree of connectedness

Usage

1
sim_deg_conn(n, p = 0.5)

Arguments

n

Positive integer, number of nodes in the network

p

Positive double, probability of a node having a connection with another. Default is 0.5.

Value

Returns an n x n adjacency matrix A.mat

Examples

1
2
sim_deg_conn(10) # edge exists between 2 nodes with probability 0.5
sim_deg_conn(10, p = 0.1) # edge exists between 2 nodes with probability 0.1

lwa19/centrality documentation built on Dec. 21, 2021, 12:45 p.m.