EVOLUTION-MANAGER
Edit File: click.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: Query by clicking on a map</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 click {raster}"><tr><td>click {raster}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Query by clicking on a map</h2> <h3>Description</h3> <p>Click on a map (plot) to get values of a Raster* or Spatial* object at that location; and optionally the coordinates and cell number of the location. For SpatialLines and SpatialPoints you need to click twice (draw a box). </p> <h3>Usage</h3> <pre> ## S4 method for signature 'Raster' click(x, n=Inf, id=FALSE, xy=FALSE, cell=FALSE, type="n", show=TRUE, ...) ## S4 method for signature 'SpatialGrid' click(x, n=1, id=FALSE, xy=FALSE, cell=FALSE, type="n", ...) ## S4 method for signature 'SpatialPolygons' click(x, n=1, id=FALSE, xy=FALSE, type="n", ...) ## S4 method for signature 'SpatialLines' click(x, ...) ## S4 method for signature 'SpatialPoints' click(x, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>Raster*, or Spatial* object (or missing)</p> </td></tr> <tr valign="top"><td><code>n</code></td> <td> <p>number of clicks on the map</p> </td></tr> <tr valign="top"><td><code>id</code></td> <td> <p>Logical. If <code>TRUE</code>, a numeric ID is shown on the map that corresponds to the row number of the output</p> </td></tr> <tr valign="top"><td><code>xy</code></td> <td> <p>Logical. If <code>TRUE</code>, xy coordinates are included in the output</p> </td></tr> <tr valign="top"><td><code>cell</code></td> <td> <p>Logical. If <code>TRUE</code>, cell numbers are included in the output</p> </td></tr> <tr valign="top"><td><code>type</code></td> <td> <p>One of "n", "p", "l" or "o". If "p" or "o" the points are plotted; if "l" or "o" they are joined by lines. See ?locator</p> </td></tr> <tr valign="top"><td><code>show</code></td> <td> <p>logical. Print the values after each click?</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>additional graphics parameters used if type != "n" for plotting the locations. See ?locator</p> </td></tr> </table> <h3>Value</h3> <p>The value(s) of <code>x</code> at the point(s) clicked on (or touched by the box drawn). </p> <h3>Note</h3> <p>The plot only provides the coordinates for a spatial query, the values are read from the Raster* or Spatial* object that is passed as an argument. Thus you can extract values from an object that has not been plotted, as long as it spatialy overlaps with with the extent of the plot. </p> <p>Unless the process is terminated prematurely values at at most <code>n</code> positions are determined. The identification process can be terminated by clicking the second mouse button and selecting 'Stop' from the menu, or from the 'Stop' menu on the graphics window. </p> <h3>See Also</h3> <p><code><a href="select.html">select</a>, <a href="drawExtent.html">drawExtent</a></code> </p> <h3>Examples</h3> <pre> ## Not run: r <- raster(system.file("external/test.grd", package="raster")) plot(r) click(r) # now click on the plot (map) ## End(Not run)</pre> <hr /><div style="text-align: center;">[Package <em>raster</em> version 3.3-13 <a href="00Index.html">Index</a>]</div> </body></html>