I think I am misunderstanding something about the identify() function. if we have an example such as this:> x_1:10 > y_1:10 > plot(x,y) > identify(x,y, n=1)[1] 2 3>I clicked on two points and identify() returned both of them (2 and 3). The manual says n is the maximum number of points to be identified. If I specify n=1, should identify() return a single value? Richard -- Richard Lammers Phone: (603) 862-4699 Complex System Research Center Fax: (603) 862-0188 University of New Hampshire email: Richard.Lammers at unh.edu Durham, NH 03824 (USA) URL: TBA =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
On Fri, 20 Jun 1997, Richard Lammers wrote:> > I clicked on two points and identify() returned both of them (2 and 3). > > The manual says n is the maximum number of points to be identified. > > If I specify n=1, should identify() return a single value? >According to the documentation, yes. On the other hand, if you look at the code you find that it doesn't actually have a n= argument. The documentation is wrong. Thomas Lumley ------------------------------------------------------+------ Biostatistics : "Never attribute to malice what : Uni of Washington : can be adequately explained by : Box 357232 : incompetence" - Hanlon's Razor : Seattle WA 98195-7232 : : ------------------------------------------------------------ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > If I specify n=1, should identify() return a single value?Further notes: The do_identify function in plot.c does indeed have a while (k<n){} loop around the code that does the work. However, n is the number of points, not an argument, and k is never incremented. It looks as though someone got distracted in the middle of coding ;-). Thomas Lumley ------------------------------------------------------+------ Biostatistics : "Never attribute to malice what : Uni of Washington : can be adequately explained by : Box 357232 : incompetence" - Hanlon's Razor : Seattle WA 98195-7232 : : ------------------------------------------------------------ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=