EVOLUTION-MANAGER
Edit File: focalWeight.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Focal weights matrix</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for focalWeight {raster}"><tr><td>focalWeight {raster}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Focal weights matrix</h2> <h3>Description</h3> <p>Calculate focal ("moving window") weight matrix for use in the <code><a href="focal.html">focal</a></code> function. The sum of the values adds up to one. </p> <h3>Usage</h3> <pre> focalWeight(x, d, type=c('circle', 'Gauss', 'rectangle')) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>Raster* object</p> </td></tr> <tr valign="top"><td><code>d</code></td> <td> <p>numeric. If <code>type=circle</code>, the radius of the circle (in units of the CRS). If <code>type=rectangle</code> the dimension of the rectangle (one or two numbers). If <code>type=Gauss</code> the size of sigma, and optionally another number to determine the size of the matrix returned (default is 3 times sigma)</p> </td></tr> <tr valign="top"><td><code>type</code></td> <td> <p>character indicating the type of filter to be returned</p> </td></tr> </table> <h3>Value</h3> <p>matrix that can be used in <code><a href="focal.html">focal</a></code> </p> <h3>Examples</h3> <pre> r <- raster(ncols=36, nrows=18, xmn=0) # Gaussian filter for square cells gf <- focalWeight(r, 2, "Gauss") </pre> <hr /><div style="text-align: center;">[Package <em>raster</em> version 3.3-13 <a href="00Index.html">Index</a>]</div> </body></html>