I want to use locator() to place user-selected points on a plot. In the RStudio plot pane a small "blue pin" shows when I select a point, but no mark is left at that point until I stop locator(). [While not that important the locator beep is also not issued when the plot is in the RStudio plot pane.] This can be seen when running the following in RStudio (I commented the lines as locator() is an interactive function).
# plot(1)
# locator(2,type="p")
However, if a new window is opened (separate from RStudio) then points are added to the plot as they are selected (and the locator beep is issued). This may be seen with the following.
# windows(5,5)
# plot(1)
# locator(2,type="p")
Is it possible to have the points appear as they are selected when using the RStudio plot pane?