[Rd] identify() bug (PR#8576)

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Wed Feb 8 12:35:57 CET 2006

Please do not use R-bugs to ask questions.  Well under half the traffic on
R-bugs is related to actual bug reports.

On Wed, 8 Feb 2006 arsenije at ist.utl.pt wrote:

> Full_Name: Vladan Arsenijevic
> Version: 2.2.1
> OS: linux/gentoo
> Submission from: (NULL) (
> I have a vector of floats that I want to assign to a set of the points in the
> plot with identify(). When I print the vector, it appears with a certain
> precision (let's say 2 decimal places), while in the plot it gets 12 more.
> For example 8.97 turns to 8.97000000000025. Any hint?

The 'labels' are character strings and as.character is using the full
precision of your numbers.  If you do not want what you asked for, ask
for something else, e.g. via round() or format().

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-devel mailing list