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.

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

dispersal_sphere(n = 100, centre_lat = 0, centre_lon = 0, dispersal_model = "normal", scale = 1)
#> $longitude #> [1] -1.259089e-02 2.296121e-03 -2.191884e-02 -5.010379e-05 5.589758e-03 #> [6] 1.032791e-02 -1.638400e-02 -2.224250e-03 -2.196140e-03 -2.542431e-03 #> [11] -4.979538e-03 5.656571e-03 1.857122e-02 -1.466784e-02 4.608366e-03 #> [16] -1.675447e-02 -4.694571e-03 -4.730604e-04 4.883283e-03 -8.220472e-03 #> [21] 4.210214e-03 3.264099e-03 -1.173204e-02 6.634982e-03 1.698373e-02 #> [26] -8.763449e-04 -8.416277e-03 -1.434446e-04 -7.435492e-03 -1.360134e-02 #> [31] 8.411923e-03 1.587200e-03 2.191516e-03 1.460093e-02 1.007583e-03 #> [36] -1.205064e-03 -1.717783e-02 -2.511241e-03 -2.818887e-03 9.598530e-03 #> [41] 6.298385e-04 -5.747774e-03 -4.493451e-04 -2.261645e-03 4.000157e-03 #> [46] 2.478007e-02 4.184668e-04 5.195462e-03 1.062952e-03 -1.719252e-02 #> [51] 7.752930e-03 -2.187481e-03 -1.853387e-03 1.724682e-04 2.658463e-04 #> [56] 4.944718e-03 -2.045161e-02 2.412482e-02 -3.248541e-03 1.918754e-03 #> [61] 9.661825e-03 -5.981282e-03 1.001801e-02 -2.211400e-03 -1.059008e-02 #> [66] -8.776035e-03 9.578291e-03 1.184142e-03 4.394344e-03 -1.528353e-02 #> [71] -1.322665e-02 2.555425e-03 1.202681e-02 2.128661e-03 1.185570e-02 #> [76] 4.711634e-03 5.456616e-03 -9.886753e-04 1.548467e-03 -8.123328e-04 #> [81] 1.730604e-02 1.167673e-02 6.734042e-03 5.002246e-03 -4.930596e-03 #> [86] 9.987281e-03 -2.349329e-02 -1.400188e-03 3.902065e-03 -3.434969e-03 #> [91] 3.814811e-03 9.560706e-03 9.431299e-03 -3.426676e-04 4.372042e-03 #> [96] 1.504459e-02 -3.186847e-03 8.510711e-03 1.184250e-02 -2.667748e-03 #> #> $latitude #> [1] -0.0034822953 -0.0070635656 -0.0095034627 -0.0071544760 -0.0157945644 #> [6] -0.0062101565 -0.0050230888 -0.0048263292 0.0020426034 0.0087994565 #> [11] -0.0018785268 -0.0125852006 0.0023250816 -0.0039731979 0.0051135414 #> [16] 0.0191272254 0.0038208438 -0.0151471077 0.0022429241 0.0096482662 #> [21] 0.0183404884 0.0040420349 0.0125168843 0.0038362051 0.0009675261 #> [26] 0.0002005014 0.0054284042 -0.0023620733 -0.0047507930 0.0017280413 #> [31] -0.0103080212 0.0076099215 0.0007349223 -0.0117371991 -0.0084977983 #> [36] 0.0040859921 -0.0076910207 -0.0025801107 0.0080485833 0.0006052834 #> [41] -0.0014629834 -0.0074401791 0.0168758205 0.0068927623 0.0088129623 #> [46] 0.0118870617 -0.0100698014 0.0046279073 -0.0135716609 0.0137842751 #> [51] 0.0038594150 0.0010981024 -0.0102343914 -0.0050183506 0.0094657065 #> [56] 0.0060945554 0.0003462347 -0.0032050129 0.0070402861 0.0072342475 #> [61] -0.0170876574 0.0084157103 -0.0027793669 0.0023658155 -0.0161031793 #> [66] -0.0070889821 -0.0101895086 0.0032704061 -0.0025710518 0.0046555103 #> [71] -0.0009254799 -0.0087600183 0.0114274305 0.0086412646 0.0069132773 #> [76] 0.0093163492 -0.0042617688 -0.0114693621 -0.0027485128 0.0198909209 #> [81] -0.0093679487 -0.0103109366 -0.0150665804 0.0137230960 0.0049839101 #> [86] 0.0179244712 -0.0013860411 0.0230622782 0.0095507878 0.0102765019 #> [91] 0.0101069255 -0.0035703202 -0.0074037654 -0.0052060345 0.0158621389 #> [96] 0.0011960271 0.0033859398 0.0102406439 0.0111629469 0.0055046661 #>