to_matrix: Matrix conversion for Population Graph

Description Usage Arguments Value Author(s)

Description

This function translates a Population to a matrix representing either the adjacency structure, the shortest path, or edge weights.

Usage

1
to_matrix(x, mode = c("adjacency", "shortest path", "edge weight")[1], ...)

Arguments

x

An object of type popgraph

mode

The kind of matrix to make. At present, the following types are available:

  • adjacencyA binary matrix representing the pairs of connected nodes (default)

  • shortest pathThe shortest path between all nodes.

  • edge weightSimilar to the adjacency matrix but using edge weights instead of binary values

...

Optional arguemnts passed on to the distance functions.

Value

A matrix (KxK) in size (where K is the number of nodes)

Author(s)

Rodney J. Dyer <rjdyer@vcu.edu>


popgraph documentation built on April 14, 2017, 9:58 p.m.