[Rd] [FORGED] bug in {graphics} identify()
Paul Murrell
p@ul @ending from @t@t@@uckl@nd@@c@nz
Thu May 17 01:09:43 CEST 2018
Hi
Samuel Granjeaud spotted this recently too.
I have committed a change to r-devel 74732 that adds an 'order' argument
to identify() so that you can get the order of the selections as part of
the result (and updated the documentation). For example ...
plot(1:10)
## Works as before
identify(1:10)
## Works as before
identify(1:10, pos=TRUE)
## New
identify(1:10, pos=TRUE, order=TRUE)
x <- identify(1:10, pos=TRUE, order=TRUE)
x$ind[x$order]
Paul
On 16/05/18 10:13, Richard Rowe wrote:
> R3.4.x, R3.5.0, Windows7 64 bit code
>
> {graphics} identify()
> is sorting results before returning the vector. As documented it should
> return the raw sequence in the order selected ...
>
> "If |pos| is |FALSE|, an integer vector containing the indices of the
> identified points, in the order they were identified. "
>
> X<-rnorm(100) # 100 random numbers
> dim(X)<-c(50,2) # making a 50 x 2 matrix to give 50 'fixes' for
> now
>
> plot(X, asp=1) # onto the screen
> boundary.points<-identify(X) # proceed to identify boundary points, right
> click and end
> boundary.points
> # and results are sorted, not in the raw order obtained ...
>
> I'm not on the bugzilla listing, I think my last core bug report was for
> chisq in 1998 ...
>
> Richard
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
--
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/
More information about the R-devel
mailing list