genmovnet: Generate network adjacency matrix for movement

Description Usage Arguments Details Examples

View source: R/genmovnet.R

Description

This function generates an adjacency matrix for movement, assumed symmetric (in this version). It is used by functions including INAscene. The movement adjacency matrix is composed of 1s and 0s only if lktype="pa" option is used

Usage

1
genmovnet(geocoords4n, amdist4, iplot = F, amrandp4, ampla4, amplb4)

Arguments

geocoords4n

the matrix of xy coordinates for node locations, used when the probability of a link is a function of distance (note that the distance between each pair of locations is assumed to be greater than 1)

amdist4

the function of distance used to estimate movement probability - 'random' (not related to distance) or 'powerlaw' (inverse power law) or 'exp' (negative exponential, to be added)

iplot

if T, generates igraph plot of adjacency matrix

amrandp4

random matrix with entries binomial with probability p

ampla4

inverse power law parameter a in ad^(-b)

amplb4

inverse power law parameter b in ad^(-b)

Details

Updated 2020-09-05

Examples

1
2
3
4
5
x1 <- genmovnet(j <- genlocs(xrange4=c(0,50), yrange4=c(0,50), numnodes4=50, randgeo4=TRUE), amdist4='random', amrandp4=0.01, iplot=T)
x2 <- genmovnet(j <- genlocs(xrange4=c(0,50), yrange4=c(0,50), numnodes4=100, randgeo4=TRUE), amdist4='random', amrandp4=0.02, iplot=T)
x7 <- genmovnet(geocoords4n=matrix(c(1,1, 1,2, 1,3, 2,1, 2,2, 2,3),ncol=2,byrow=T), amdist4='powerlaw', ampla4=2, amplb4=1, iplot=T)
x8 <- genmovnet(j <- genlocs(numnodes4=30, xrange4 = c(0, 10), yrange4 = c(0, 10)), amdist4='powerlaw', ampla4=2, amplb4=1, iplot=T)
x9 <- genmovnet(j <- genlocs(numnodes4=300, xrange4 = c(0, 10), yrange4 = c(0, 100)), amdist4='powerlaw', ampla4=2, amplb4=1, iplot=T)

GarrettLab/INApreliminary documentation built on June 7, 2021, 10:59 a.m.