Arranging the data

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

Arranging the data

namit
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Arranging the data

arun kirshna
This post has NOT been accepted by the mailing list yet.
Hello,

Isn't this the same you posted a little while ago with heading "sorting"?   I guess I answered that.  

A.K.
Reply | Threaded
Open this post in threaded view
|

Re: Arranging the data

namit
Hi Arun,

Its the same question,but i need to arrange them i a perticular order ,,,which is not in desc or ascending  order.

Thanks,
Namit
Reply | Threaded
Open this post in threaded view
|

Re: Arranging the data

arun kirshna
This post has NOT been accepted by the mailing list yet.
In reply to this post by namit
Hello,

Ordering by y obviously give the result, but I guess your original dataset probably needs ordering by x.  

Anyway, try this:

dat2<-read.table(text="
x z y
ss 1 2
aa 3 0
cc 2 5
",sep="", header=TRUE)

 dat2[order(rev(dat2$x),dat2$x,decreasing=FALSE),]
   x z y
2 aa 3 0
1 ss 1 2
3 cc 2 5

A.K.
Reply | Threaded
Open this post in threaded view
|

Re: Arranging the data

arun kirshna
In reply to this post by namit
HI Namit,

I did posted a reply on nabble.  Is that the solution you were looking for??

A.K.



----- Original Message -----
From: namit <[hidden email]>
To: [hidden email]
Cc:
Sent: Thursday, July 26, 2012 1:32 AM
Subject: Re: [R] Arranging the data

Hi Arun,

Its the same question,but i need to arrange them i a perticular order
,,,which is not in desc or ascending  order.

Thanks,
Namit



--
View this message in context: http://r.789695.n4.nabble.com/Arranging-the-data-tp4637865p4637872.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.