Description Usage Arguments Details Value Examples

View source: R/rasterLocalQuantiles.R

`rasterLocalQuantiles`

finds the quantile within the positive valued neighborhood
of `W`

.

1 | ```
rasterLocalQuantiles(r, W, q = 50)
``` |

`r` |
An in memory raster image. |

`W` |
A matrix of weights used to specify a local neighborhood. The quantile
kernel will be applied to each pixel in |

`q` |
A quantile. This value is required to be in the inclusive interval from 0 to 100. |

A spatial neighborhood is calculated for each pixel in `r`

.
The spatial neighborhood for each pixel is defined by the weight matrix
`W`

, where the center of the odd dimensioned matrix `W`

is identified
with the target pixel. The target pixel value is replaced with the
quantile of the neighborhood identified by `W`

. Only non-missing or neighbors
with non-zero weights are used in the calculation. Quantile calculation uses
the inverse empirical CDF transform, equivalent to `stats::quantile`

type=1.

An in memory raster image of local quantiles.

1 2 3 | ```
r <- raster::raster( matrix(rnorm(36),6,6))
W <- matrix(1,3,3)
medianR <- rasterLocalQuantiles(r,W)
``` |

jlisic/rasterKernelEstimates documentation built on May 17, 2017, 11:24 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.