This function simply gets the width and height values of the points on which you click. The result is a list of two vectors, the first vector is for width, the second for height.
image_locator(x, rectangle = FALSE)
a raster object, or an image loaded by
magick::image_read
or the filename of
that image.
if it is FALSE (default), the result list contains the width and height values. If it is TRUE, only the left, right, top, bottom values of the rectangle designated by your clicking are returned.