identify() bug (PR#8576)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

identify() bug (PR#8576)

arsenije
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?
Regards!

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: identify() bug (PR#8576)

Brian Ripley
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 [hidden email] 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,                  [hidden email]
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel