Learn R Programming

mvngGrAd (version 0.1.4)

sketchGrid: 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 duplicat
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
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

Value

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

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").

See Also

movingGrid

Examples

Run this code
## 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)

Run the code above in your browser using DataLab