curvCALC: Generate a random network

Description Usage Arguments Value Examples

Description

This function generates a random migratory network

Usage

1
curvCALC(x, y, digits = 3)

Arguments

x

value for x axis, typically number or proportion of sites lost

y

value for y axis, typically population lost or proportion of population lost

digits

number of digits to round the result to

Value

a list containting the network which was randomly generated, the tracks that were randomly generated, and the sites that were randomly generated for animals to use.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
pop=100000
rand_net = randomNET(nsites=100,nbreeding=3, nwintering=3,pop=pop,
                     mean_dist = 8000, sd_dist=9000, toplot=FALSE)

# priotise sites according to flow through network
prioritisation = prioritiseFLOW(rand_net$network, rand_net$sites, toplot=FALSE, returnNET = FALSE)

y=(prioritisation$prioritisation$Pop_Flow/pop)
x=((1:length(prioritisation$prioritisation$Pop_Flow))/
    length(prioritisation$prioritisation$Pop_Flow))


# calculate area under curve
AUC = curvCALC(x,y)
par(mfrow=c(1,1), mar=c(4,4,1,1))
plot(x,y,type="o",pch=20, main = AUC)

KiranLDA/migflow documentation built on Aug. 8, 2019, 8:55 p.m.