row: Numeric. Row number, should be between 1 and nrow(x). Can be omitted to get all rows
nrows: Numeric. Number of rows, should be a positive integer smaller than row+nrow(x). Should be omitted if row is omitted
ngb: Neighbourhood size. Either a single integer or a vector of two integers c(nrow, ncol)
names: logical. If TRUE, the matrix returned has row and column names
padValue: numeric. The value of the cells of the "padded" rows and columns. That is 'virtual' values for cells within a neighbourhood, but outside the raster
array: logical. If TRUE and x has multiple layers, an array is returned in stead of a list of matrices
...: additional arguments (none implemented)
Returns
If x has a single layer, a matrix with one row for each focal cell, and one column for each neighbourhood cell around it.
If x has multiple layers, an array (if array=TRUE) or a list of such matrices (one list element (matrix) for each layer)