Learn R Programming

virtualNicheR (version 1.0)

niche.grid.coords: Niche Grid Coordinates

Description

Create an n-dimensional grid of coordinates across niche space.

Usage

niche.grid.coords(mins, maxs, nCoords)

Arguments

mins

Vector of length n listing the niche space minimum for each dimension.

maxs

Vector of length n listing the niche space maximum for each dimension.

nCoords

Number of coordinates across the niche space in all dimensions.

Value

A matrix with n columns.

Details

This function creates a grid of coordinates systematically located throughout the specified niche space to enable visualisation of niche patterns. The extent of the grid is given by the mins and maxs, and the number of coordinates for each dimension is given by nCoords.

References

Etherington TR, Omondiagbe OP (2019) virtualNicheR: generating virtual fundamental and realised niches for use in virtual ecology experiments. Journal of Open Source Software 4:1661 https://doi.org/10.21105/joss.01661

Examples

Run this code
# NOT RUN {
# Niche space grid coordinates usage
niche.XY = niche.grid.coords(mins=c(15,0), maxs=c(35,200), nCoords=5)
# }

Run the code above in your browser using DataLab