rangeBuffer: Buffered range Calculate the limits of a buffered range for a...

View source: R/create.outer.R

rangeBufferR Documentation

Buffered range Calculate the limits of a buffered range for a numerical vector.

Description

Buffered range

Calculate the limits of a buffered range for a numerical vector.

Usage

rangeBuffer(x, f)

Arguments

x

Numerical vector

f

Number greater than zero indicating the amount of expansion. Default 0.1. Zero is the same as range(x).

Value

Numerical vector with minimum and maximum limits of the buffered range.

Examples

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)


JeffWeinell/misc.wrappers documentation built on Sept. 20, 2023, 12:42 p.m.