w_azimuth: Create matrix with azimuths to center

Description Usage Arguments Value Examples

View source: R/w_azimuth.R

Description

Creates a matrix with directions (i.e., azimuth) to central cell, of specified size k. The matrix can be used as weight matrix when calculating the convergence index (see Examples).

Usage

1

Arguments

k

Neighborhood size around focal cell. Must be an odd number. For example, k=3 implies a 3*3 neighborhood.

Value

A matrix where each cell value is the azimuth from that cell towards the matrix center.

Examples

1
2
3
4
m = w_azimuth(3)
m
m = w_azimuth(5)
m

starsExtra documentation built on Nov. 18, 2021, 5:08 p.m.