Learn R Programming

spatialEco (version 2.0-1)

annulus.matrix: Annulus matrix

Description

Creates a square matrix representing annulus position values of 1 and defined null

Usage

annulus.matrix(scale = 3, inner.scale = 0, outer.scale = 0, null.value = 0)

Value

A matrix object with defined null.value and 1, representing retained rings

Arguments

scale

Number of rings (defines dimensions of matrix)

inner.scale

Number of inner rings to set to null.value

outer.scale

Number of outer rings to set to null.value

null.value

Value to set inner and outer scale(s) to

Author

Jeffrey S. Evans <jeffrey_evans@tnc.org>

Examples

Run this code
annulus.matrix(5)                   # 5 concentric rings
annulus.matrix(5, 3)                # 5 concentric rings with the 3 inner set to 0
annulus.matrix(5, 3, null.value=NA) # 5 concentric rings with the 3 inner set to NA
annulus.matrix(5, 3, 5)             # 5 rings with 3 inner and 5 outer set to 0
annulus.matrix(9, 3, 7)             # 9 rings with 3 inner and 7 outer set to 0

Run the code above in your browser using DataLab