EVOLUTION-MANAGER
Edit File: direction.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: Direction</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 direction {raster}"><tr><td>direction {raster}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Direction</h2> <h3>Description</h3> <p>The direction (azimuth) to or from the nearest cell that is not <code>NA</code>. The direction unit is in radians, unless you use argument <code>degrees=TRUE</code>. </p> <h3>Usage</h3> <pre> ## S4 method for signature 'RasterLayer' direction(x, filename='', degrees=FALSE, from=FALSE, doEdge=FALSE, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>RasterLayer object</p> </td></tr> <tr valign="top"><td><code>filename</code></td> <td> <p>Character. Output filename (optional)</p> </td></tr> <tr valign="top"><td><code>degrees</code></td> <td> <p>Logical. If <code>FALSE</code> (the default) the unit of direction is radians.</p> </td></tr> <tr valign="top"><td><code>from</code></td> <td> <p>Logical. Default is <code>FALSE</code>. If <code>TRUE</code>, the direction from (instead of to) the nearest cell that is not <code>NA</code> is returned</p> </td></tr> <tr valign="top"><td><code>doEdge</code></td> <td> <p>Logical. If <code>TRUE</code>, the <code><a href="boundaries.html">boundaries</a></code> function is called first. This may be efficient in cases where you compute the distance to large blobs. Calling <code>boundaries</code> determines the edge cells that matter for distance computation</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Additional arguments as for <code><a href="writeRaster.html">writeRaster</a></code></p> </td></tr> </table> <h3>Value</h3> <p>RasterLayer</p> <h3>See Also</h3> <p><code><a href="distance.html">distance</a></code>, <code><a href="gridDistance.html">gridDistance</a></code> </p> <p>For the direction between (longitude/latitude) points, see the <code>azimuth</code> function in the <code>geosphere</code> package </p> <h3>Examples</h3> <pre> r <- raster(ncol=36,nrow=18) values(r) <- NA r[306] <- 1 b <- direction(r) #plot(b) </pre> <hr /><div style="text-align: center;">[Package <em>raster</em> version 3.3-13 <a href="00Index.html">Index</a>]</div> </body></html>