Learn R Programming

starsExtra (version 0.1.2)

w_azimuth: Create matrix with azimuths to center

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

w_azimuth(k)

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

Run this code
# NOT RUN {
m = w_azimuth(3)
m
m = w_azimuth(5)
m

# }

Run the code above in your browser using DataLab