rangeBuffer | R Documentation |
Buffered range
Calculate the limits of a buffered range for a numerical vector.
rangeBuffer(x, f)
x |
Numerical vector |
f |
Number greater than zero indicating the amount of expansion. Default 0.1. Zero is the same as range(x). |
Numerical vector with minimum and maximum limits of the buffered range.
library(misc.wrappers)
# Sample 50 points from 10-degree radius area with center located on land somewhere between -50 and 50 degrees latitude.
coords50 <- rcoords(r=10,size=50,limits=c(-180,180,-50,50))
# Sample 100 points each from two allopatric groups (populations), both with centers somewhere on land between -50 and 50 latitude and centers are between 5 and 20 degrees from each other.
coords50.K2.allopatric <- rcoords(r=5,size=c(50,100),limits=c(-180,180,-50,50),n.grp=2,interactions=c(0,0))
# Use default settings to generate 100 points over land for one group
coords100 <- rcoords(show.plot=T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.