From ripley at stats.ox.ac.uk  Wed Feb  8 12:35:57 2006
From: ripley at stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Wed,  8 Feb 2006 12:35:57 +0100 (CET)
Subject: [Rd] identify() bug (PR#8576)
Message-ID: <20060208113557.ACB243F0D6@slim.kubism.ku.dk>

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) (193.136.128.14)
>
>
> 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



[Rd] identify() bug (PR#8576)
ripley@stats.ox.ac.uk