Learn R Programming

metricTester (version 1.3.6)

plotPlacer: Randomly place plots in arena

Description

Given a desired number of plots, the arena size, and the plot size, will attempt to place plots down in a non-overlapping fashion

Usage

plotPlacer(no.plots, arena.length, plot.length)

Arguments

no.plots

Number of plots to place

arena.length

Length of one side of arena

plot.length

Length of one side of desired plot.

Value

A matrix with the X & Y coordinates of the four corners of each plot placed

Details

Places plots down in non-overlapping fashion according to parameters supplied. Because this would run indefinitely if unacceptable parameters were supplied, a conservative check is implemented to "ensure" the function does not get stuck. If unacceptable parameters are supplied, will return an arena and a smaller total sampling area will need to be defined.

References

Miller, E. T., D. R. Farine, and C. H. Trisos. 2016. Phylogenetic community structure metrics and null models: a review with new methods and software. Ecography DOI: 10.1111/ecog.02070

Examples

Run this code
# NOT RUN {
boundResults <- plotPlacer(no.plots=10, arena.length=300,
plot.length=50)
# }

Run the code above in your browser using DataLab