Learn R Programming

GNAR (version 1.0)

GNARtoigraph: Converts a GNAR network to a weighted igraph object

Description

Takes an input network and neighbour stage and returns it in igraph form.

Usage

GNARtoigraph(net=GNAR::fiveNet, stage=1, normalise=FALSE)

Arguments

net

a GNARnet object containing $edges and dist.

stage

the neighbour set that the adjacency matrix is created for.

normalise

whether to normalise each to non-zero row to have sum one.

Value

GNARtoigraph returns an 'igraph' object with weights as the inverse distances of the input network.

Details

With normalisation this is a non-invertible transform. See NofNeighbours for neighbour set definition. See is.GNARnet for GNARnet object information and example construction.

Examples

Run this code
# NOT RUN {
#fiveNet as an igraph object
GNARtoigraph()
# }

Run the code above in your browser using DataLab