getBufferedPoints: Gets Points From A Rectangle With A Buffer

Description Usage Arguments Value Examples

Description

This function finds the min and max values of x and y in a dataframe, then picks n number of points within that buffer and returns them in vector form.

Usage

1
getBufferedPoints(x, y, buffer, n = 100, systematic = FALSE, by = 1)

Arguments

x

A vector of x values

y

A vector of y values

buffer

A value that indicates how much buffer there should be along each edge of the plot

n

Optional. The number of points from the buffered area to sample from

systematic

Optional, set to FALSE. If TRUE, this function will systematically sample based on the value in the parameter "by"

by

Optional. This tells the function how to increment during systematic sampling.

Value

This function returns a data.frame of x and y values within the buffer zone designated in the function call.

Examples

1
2
getRandomBufferedPoints(generatePlotMap()[,"x"],generatePlotMap()[,"y"],
buffer=10, n=5)

ecology-rocks/disperseR documentation built on May 15, 2019, 7:58 p.m.