This function returns all values or a row of values for a Raster* object. It will take them from memory if available, else it will read them from disk.
Function values is a shorthand version of getValues.
Usage
## S3 method for class 'Raster':
getValuesFocal(x, row, nrows, ngb, ...)
Arguments
x
Raster* object
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 an integer > 0 & < row+nrow(x). Should be omitted if row is omitted
ngb
Neighborhood size. Either a single integer or a vector of two integers c(nrow, ncol)
...
Additional arguments. One implemented: names (Boolean). If TRUE, the matrix returned has row and column names
Value
If x has a single layer, a matrix with one row for each focal cell, and one column for each neighborhood cell around it.
If x has multiple layers, a list of such matrices (one list element / matrix for each layer)