Description Usage Arguments Value Examples
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.
1 | getBufferedPoints(x, y, buffer, n = 100, systematic = FALSE, by = 1)
|
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. |
This function returns a data.frame of x and y values within the buffer zone designated in the function call.
1 2 | getRandomBufferedPoints(generatePlotMap()[,"x"],generatePlotMap()[,"y"],
buffer=10, n=5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.