Learn R Programming

mvngGrAd (version 0.1.4)

extendHorVer: Vertical and horizontal extension of the grid ('cross shape')

Description

The function finds the subscripts of the cells that extend from the center in 0, 90, 180 and 270 degree direction ('cross shape'). The function is not intended to be called by the user.

Usage

extendHorVer(i, j, shapeCross, rowLimit, colLimit)

Arguments

i
"integer", row subscript of center cell
j
"integer", column subscript of center cell
shapeCross
"list" of length 4, each element contains the cells that are to be included in the grid that extends from the center in 0, 90, 180 and 270 degree direction. Elements can be NULL (no extension in this direction) and must c
rowLimit
"integer", row limit (= number of rows) of the field layout
colLimit
"integer", column limit (= number of columns) of the field layout

Value

  • A matrix with the row subscripts of the cells in column one and the column subscripts in column two.

Details

This function is called by the function movingGrid and is not intended to be called by the user.

Examples

Run this code
shape <- list(c(1,2,3),
              c(1,2,3),
              c(1:5),
              c(1:5))

extendHorVer(i = 25,
             j = 25,
             shapeCross = shape,
             rowLimit = 50,
             colLimit = 50)

Run the code above in your browser using DataLab