edge_contortion: Determines of edges are stretched or compressed and adds...

View source: R/edge_contortion.R

edge_contortionR Documentation

Determines of edges are stretched or compressed and adds attribute to popgraph object.

Description

This function measure the deviation of edges in physical space from the expected value given by the genetic distance.

Usage

edge_contortion(
  graph,
  latitude = "Latitude",
  longitude = "Longitude",
  P = NULL
)

Arguments

graph

A popgraph object

latitude

The name of the node property that has the value of the latitude for that node (default 'Latitude').

longitude

The name of the edge property that has the longitude (default 'Longitude')

P

A non-genetic distance (physical or ecological) matrix on which the genetic distances are compared.

Value

A copy of the graph with new properties 'contortion' (the magnitude of differences between genetic and physical distances) and 'stretch' (as 'Compressed' or 'Extended')

Author(s)

Rodney J. Dyer rjdyer@vcu.edu


dyerlab/popgraph documentation built on July 22, 2022, 5:42 p.m.