View source: R/standardFocalWindow.R
standardFocalWindow | R Documentation |
this function produces a square matrix for use with focal
.
User can set the size (must be odd) and center value (i.e. 0 or 1). All
non-center values are set to 1.
standardFocalWindow(n = 3, center = 0L)
n |
size (i.e. ncol and nrow) |
center |
the value (weight) for the center of the window. Defaults to 0 |
A matrix
of 1s with n
columns and n
rows and
a center value of center
Tim Appelhans
standardFocalWindow() # 3 by 3 matrix
standardFocalWindow(n = 5, center = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.