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

From: <ripley_at_stats.ox.ac.uk>
Date: Wed 08 Feb 2006 - 11:35:57 GMT


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@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@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

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed Feb 08 22:41:28 2006

This archive was generated by hypermail 2.1.8 : Wed 08 Feb 2006 - 18:58:44 GMT