sketchGrid {mvngGrAd}R Documentation

Function to aid with grid design

Description

The function aids with grid design by plotting the designed grid.

Usage

sketchGrid(i, j, rowLimit, colLimit, layers, shapeCross, excludeCenter,...)

Arguments

i

"integer", row subscript of center cell

j

integer value, giving the column of the center cell

rowLimit

"integer", row limit (= number of rows) of the field layout

colLimit

"integer", column limit (= number of columns) of the field layout

layers

"integer", vector giving the layers to be included in the grid that extents from the center cell in all other directions than 0, 90, 180 and 270 degree. Can be NULL ( no extension) and must not contain '0', negative or duplicated values.

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 contain no '0', duplicated or negative values.

shapeCross[[1]]DOWN (180 degree) from the center cell (same column)

shapeCross[[2]]UP (0 degree) from the center cell (same column)

shapeCross[[3]]LEFT (270 degree) from the center cell (same row)

shapeCross[[4]]RIGHT (90 degree) from the center cell (same row)

excludeCenter

Should the center entry (the one which is adjusted) be included in the calculation of the moving mean, logical TRUE (default) or FALSE.

...

further arguments passed to or from other methods

Details

When using the function movingGrid, this function can be used to look at different designs, to see how many and which cells are included when the center cell is close to the edge of the field layout, and for verifying that the actual arguments to shapeCross and layers really specify the intended design.

sketchGrid is a generic function with currently one method for sketching a designed grid (as needed for function movingGrid). The method is dispatched when the arguments shapeCross and layers are given (with class "ANY").

Value

A plot is created (via a call to function plot from the traditional R graphics system).

Rdversion

1.1

Author(s)

Frank Technow

See Also

movingGrid

Examples

## with method for designed grid

sketchGrid(25,
           25,
           shapeCross = list(c(1:4,7),
             c(1:4,7),
             c(1:4,7),
             c(1:4,7)),
           layers = c(1,2,3,5,6),
           excludeCenter = TRUE,
           rowLimit = 50,
           colLimit = 50)


[Package mvngGrAd version 0.1.6 Index]