dispersal_sphere: Draw from spherical distribution

Description Usage Arguments Examples

View source: R/misc.R

Description

Draw from distribution converted to spherical coordinate system. Points are first drawn from an ordinary cartesian 2D normal distribution. The distances to points are then assumed to be great circle distances, and are combined with a random bearing from the point centre_lat, centre_lon to produce a final set of lat/lon points.

Usage

1
2
3
4
5
6
7
dispersal_sphere(
  n,
  centre_lon,
  centre_lat,
  dispersal_model = "normal",
  scale = 1
)

Arguments

n

The number of points to draw

centre_lon

The mean longitude of the distribution

centre_lat

The mean latitude of the distribution

dispersal_model

The model we draw points from (normal or cauchy)

scale

The scale parameter of the dispersal distribution defined by the parameter "dispersal_model"

Examples

1
dispersal_sphere(n = 100, centre_lat = 0, centre_lon = 0, dispersal_model = "normal", scale = 1)

Michael-Stevens-27/silverblaze documentation built on May 28, 2021, 5:47 p.m.