Skip to content

sort function (PR#9309)

4 messages · lfrank at cema.edu.ar, Ulrike Grömping, Uwe Ligges

#
Full_Name: Luis Frank
Version: 2.3.1
OS: 
Submission from: (NULL) (168.96.156.79)


Hallo!

In version 2.3.1 tha sort function applied to a vector trasposes it. This does
not happen in earlier versions. As a consequence, old programms don?t work in
newer versions.

Thanks!
Luis
#
lfrank at cema.edu.ar wrote:
Please read the FAQ how to report bugs.

1. You are using an outdated version of R, please only report bugs of 
recent R versions.
2. You have not given your OS.
3. You have not given an example that reproduces the bug, my try does 
not transpose anything:
  x <- 5:1
  x
  sort(x)

So, please ....

Uwe Ligges
#
Ulrike Gr?mping wrote:
I see. This is not a bug. It *was* a bug in R < 2.3.0 and has been 
fixed. From NEWS:

     o   sort() now does not return inappropriate attributes such as
     "dim" and "tsp": it only returns names.

You cannot expect sort to do anything meaningful when applied to 
matrices or arrays other than returning a sorted vector of the elements, 
and that is what sort does nowadays.

Best,
Uwe Ligges