sort function (PR#9309)

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

sort function (PR#9309)

lfrank
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

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

Re: sort function (PR#9309)

Uwe Ligges
[hidden email] wrote:

> 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


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


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

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

Re: sort function (PR#9309)

Ulrike Grömping-2
What Luis probably means can be reproduced by this little example:

a<-5:1
b<-t(t(a))
b
sort(b)

In R 2.2.1 (Windows XP), sort(b) is a matrix with 1 column, like b. In R 2.4.0 (and presumably already 2.3.1), sort(b) is no longer a matrix but a vector (and displayed as a row).

Regards, Ulrike

---------- Original Message -----------
From: Uwe Ligges <[hidden email]>
To: [hidden email]
Cc: [hidden email]
Sent: Fri, 20 Oct 2006 23:09:02 +0200
Subject: Re: [Rd] sort function (PR#9309)

> [hidden email] wrote:
> > 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
>
> 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
>
> > ______________________________________________
> > [hidden email] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel 
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel 
------- End of Original Message -------

 

        [[alternative HTML version deleted]]


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

Re: sort function (PR#9309)

Uwe Ligges


Ulrike Grömping wrote:
> What Luis probably means can be reproduced by this little example:
>
> a<-5:1
> b<-t(t(a))
> b
> sort(b)
>
> In R 2.2.1 (Windows XP), sort(b) is a matrix with 1 column, like b. In R 2.4.0 (and presumably already 2.3.1), sort(b) is no longer a matrix but a vector (and displayed as a row).

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


> Regards, Ulrike
>
> ---------- Original Message -----------
> From: Uwe Ligges <[hidden email]>
> To: [hidden email]
> Cc: [hidden email]
> Sent: Fri, 20 Oct 2006 23:09:02 +0200
> Subject: Re: [Rd] sort function (PR#9309)
>
>> [hidden email] wrote:
>>> 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
>> 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
>>
>>> ______________________________________________
>>> [hidden email] mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel 
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel 
> ------- End of Original Message -------
>
>  
>

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