q_rel: Calculate the Newman's Q

View source: R/q_rel.R

q_relR Documentation

Calculate the Newman's Q

Description

Wrapper around assortnet function that takes a weighted, undirected network graph and returns the assortativity coefficient.

Usage

q_rel(graph_object)

Arguments

graph_object

an igraph graph object with 'membership' attribute

Examples


g <- simulate_graph(n_animals = 25,
                    n_groups = 4,
                    time_to_leave = 5,
                    time_to_return = 2,
                    travel_time = c(0.01, 0.2),
                    samples_per_day = 1,
                    sampling_duration = 7)
q_rel(g)


gavincotterill/modulr documentation built on Nov. 30, 2022, 11:15 p.m.