EVOLUTION-MANAGER
Edit File: match.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: Value matching for Raster* objects</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 match {raster}"><tr><td>match {raster}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Value matching for Raster* objects</h2> <h3>Description</h3> <p><code>match</code> returns a Raster* object with the position of the matched values. The cell values are the index of the table argument. </p> <p><code>%in%</code> returns a logical Raster* object indicating if the cells values were matched or not. </p> <h3>Usage</h3> <pre> match(x, table, nomatch = NA_integer_, incomparables = NULL) x %in% table </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>table</code></td> <td> <p>vector of the values to be matched against</p> </td></tr> <tr valign="top"><td><code>nomatch</code></td> <td> <p>the value to be returned in the case when no match is found. Note that it is coerced to integer</p> </td></tr> <tr valign="top"><td><code>incomparables</code></td> <td> <p>a vector of values that cannot be matched. Any value in x matching a value in this vector is assigned the nomatch value. For historical reasons, FALSE is equivalent to NULL</p> </td></tr> </table> <h3>Value</h3> <p>Raster* obeject </p> <h3>See Also</h3> <p><code><a href="calc.html">calc</a>, <a href="../../base/html/match.html">match</a></code> </p> <h3>Examples</h3> <pre> r <- raster(nrow=10, ncol=10) values(r) <- 1:100 m <- match(r, c(5:10, 50:55)) n <- r %in% c(5:10, 50:55) </pre> <hr /><div style="text-align: center;">[Package <em>raster</em> version 3.3-13 <a href="00Index.html">Index</a>]</div> </body></html>