clickpoly(add=FALSE, n=NULL, ...)add=FALSE) or draw over the existing plot (add=TRUE).locator to control the
    interactive plot."owin") representing the polygon.par  The user is prompted to point the mouse at any desired locations
  for the polygon vertices,
  and click the left mouse button to add each point.
  Interactive input stops after n clicks (if n was given)
  or when the middle mouse button is pressed.
  The return value is a window (object of class "owin")
  representing the polygon.
This function uses the R
identify.ppp,
  clickppp,
  locator