Description Usage Arguments Examples
View source: R/nhapply_functions.R
Applies a function to each column of an open matrix, just like apply, with most common functions optimised. Output is a vector with the length equal to the number of columns of the input matrix.
1 |
mat_open |
is the input matrix. Every column should represent a pixel-neighbourhood and every row one element of that neighbourhood. |
FUN |
is a function, that is applied on the neighbourhood of each point of a matrix. Optimised functions are: "mean", "sum", "max", "min", "maxCount", "maxCountValue" (which value occurs most often). It is possible to add a customised function like function(x) ... which must return a single value. |
weights |
is a vector of weights that is used when summing up a neighbourhood. Vector length must be the same as points in neighbourhood. |
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.