proximity: Make potentials object-spatial proximity

Description Usage Arguments Details Value Author(s) Examples

Description

Calculate one of several measures of spatial proximity

Usage

1
2
proximity(scene, method, proximityFun = NULL, averageType = "mean",
  subject = "all", zeroPotDist = NULL)

Arguments

scene

a matingScene object

method

one of "maxProp", and "maxPropSqrd" see details for further description

proximityFun

a function used to calculate proximity. Not yet implemented

averageType

whether to calculate individual and population proximity using the mean or median

subject

whether you want pair, individual, population, or all. Specifying more than one is allowed.

zeroPotDist

the distance at which potential should be equal to zero

Details

If method is "maxProp" then proximity between two individuals will be calculated as 1 - distance/max(distance). If method is "maxPropSqrd" then proximity between two individuals will be calculated as (1 - distance/max(distance))^2.

Value

A potentials object containing one more more of the following, depending the input for subject:
If subject is "population" the return list will contain a numeric value that has a range depending on the method. If subject is "pair" the return list will contain a matrix with all pairwise proximity comparisons. If subject is "individual" the return list will contain a dataframe with a column containing IDs and a column containing proximity values. If subject is "all" the return list will contain all three of the items above.

Author(s)

Danny Hanson

Examples

1
2
pop <- simulateScene()
proximity(pop, "maxProp")

danhan52/mateable documentation built on May 14, 2019, 3:35 p.m.