xy_from_click: Get location coordinates from mouse click(s)

View source: R/spatial_tools.R

xy_from_clickR Documentation

Get location coordinates from mouse click(s)

Description

This function defines a two-column matrix of x, y coordinates from clicked locations on a map.

Usage

xy_from_click()

Value

The function returns a two-column matrix with coordinates.

Author(s)

Edward Lavender

Examples

## Not run: 
raster::plot(dat_gebco)
xy <- xy_from_click()
graphics::points(xy, col = "red")

## End(Not run)

edwardlavender/flapper documentation built on Jan. 22, 2025, 2:44 p.m.