0

I trying to use the function identify() on R, but it's not working. Do you know if there is any package that I'm missing?

It doesn't work not even for a simple code:

x = 1:10
y = x^2

name = letters[1:10]    
plot(x, y)
identify(x, y, labels = name, plot=TRUE, n = 2)
user438383
  • 5,716
  • 8
  • 28
  • 43

1 Answers1

1

This way it works: it is the same code: With n=2 you have to click on two points:

x = 1:10 
y = x^2

name = letters[1:10]
plot(x, y) 
identify(x, y, labels = name, plot=TRUE, n = 2)

enter image description here

TarJae
  • 72,363
  • 6
  • 19
  • 66