locatorRS {berryFunctions}R Documentation

locator with immediate points in Rstudio

Description

Have locator add points on the graph directly after clicking, even in Rstudio Graphics devices

Usage

locatorRS(n = 512, type = "p", ...)

Arguments

n

Maximum number of points to plot.

type

As in locator, but passed to points. DEFAULT: "p"

...

Further arguments passed to points

Value

List with x and y

Author(s)

Berry Boessenkool, berry-b@gmx.de, Dec 2020

See Also

https://stackoverflow.com/q/65147219/1587132

Examples

if(interactive()){
plot(1:10, type="n")
locs <- locator(n=3, type="o") # click on locations in graph. 
# If you do not set n at beginning, press ESC to finish
locs
# In Rstudio, points only appear after finishing.
locatorRS(7, col="blue", type="o") # plots after each click
}


[Package berryFunctions version 1.22.5 Index]