I agree with Duncan.
 
may be you need this
 
format(output[order(output[,3]),],scientific=T)
 
Pratap

--- On Sat, 2/2/13, Duncan Murdoch <murdoch.duncan@gmail.com> wrote:


From: Duncan Murdoch <murdoch.duncan@gmail.com>
Subject: Re: [R] order function
To: "Kripa R" <kripa777@hotmail.com>
Cc: r-help@r-project.org
Date: Saturday, 2 February, 2013, 4:19 AM


On 13-02-01 12:15 PM, Kripa R wrote:
>
> Hi I'm having a simple issue with the order function. When I use the following code my data is not ordered correctly
>
>> output[order(output[,3]),]
>
> Name    beta                         pval
> 881      9.09303277751237     0.000100253350483199
> 7402    6.40553461638365     0.00010228641631914
> 4879   -8.88509881106217     0.000103251645995887

That's correctly ordered in the pval column.

> However when I export the data and sort it in excel I see the following:
> Name         beta                         pval       pval
> 25037           -5.70737             2.48E-07
> 34294           -19.6931             1.04E-05
> 36002           -12.2478             1.63E-05

That is a different dataset, also correctly ordered in the third column. 
Excel seems to have added a 4th heading for some reason.
>
>
> Any suggestions on how I can get this sort to work properly on data in scientifict format?

You need to explain what is wrong before we can fix it.

Duncan Murdoch

>
> .kripa                         
>     [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org 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.
>

______________________________________________
R-help@r-project.org 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.

	[[alternative HTML version deleted]]

