Search notes:

R function: curve

curve can graph any function that takes one argument (that is: unary functions) and returns one value.
x11()

f <- function(x) {x^2}
curve (f , -2, 2)

# wait for mouse click or enter pressed
z <- locator(1)
Github repository about-r, path: /functions/curve.R

See also

R functions for graphics
Index to (some) R functions

Index