14:38
To: Hawthorne Beyer; r-help@r-project.org
Subject: Re: [R] order() function, decreasing=TRUE unexpected behaviour
I think you are confused, and there is no problem with the order function. Keep
in mind that order returns the index values in a sequence such that when the
result of the order
I think you are confused, and there is no problem with the order function. Keep
in mind that order returns the index values in a sequence such that when the
result of the order function is used as indexes for the original sequence then
the data will be sorted as desired. You may see the error of
There appears to be an issue with the decreasing=TRUE option on the order()
function that indicates either a bug or perhaps a design flaw (potentially
flawed because I would suggest the majority of users would expect different
behaviour).
# demonstration of problem:
x <- c(2,1,3,4,5)
order(x)
o
On 01.02.2013 17:52, 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]),]
Namebeta pval
881 9.09303277751237 0.000100253350483199
74026.4055346
I agree with Duncan.
may be you need this
format(output[order(output[,3]),],scientific=T)
Pratap
--- On Sat, 2/2/13, Duncan Murdoch wrote:
From: Duncan Murdoch
Subject: Re: [R] order function
To: "Kripa R"
Cc: r-help@r-project.org
Date: Saturday, 2 February, 2013, 4:19 AM
O
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]),]
Namebeta pval
881 9.09303277751237 0.000100253350483199
74026.4055346
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]),]
Namebeta pval
881 9.09303277751237 0.000100253350483199
74026.40553461638365 0.00010228641631914
4879
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]),]
Namebeta pval
881 9.09303277751237 0.000100253350483199
74026.40553461638365 0.00010228641631914
4879 -
Hi
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of maths123
> Sent: Wednesday, November 28, 2012 9:11 PM
> To: r-help@r-project.org
> Subject: Re: [R] Order function
>
> And yes I want the variable
ave a specific
question.
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
John Kane
Kingston ON Canada
> -Original Message-
> From: linda_...@hotmail.co.uk
> Sent: Wed, 28 Nov 2012 08:49:42 -0800 (PST)
> To: r-help@r-project.org
> Su
And yes I want the variable 1 to have the identifier 1 etc.
And I need to call this variable "order" so I can use it to create an anova
table.
--
View this message in context:
http://r.789695.n4.nabble.com/Order-function-tp4651022p4651198.html
Sent from the R help mailing list archive at Nabbl
I have one text file with all the data on there.
So 20 rows of data. And 3 columns: numbers 1-20, size, time.
I need to create a variable called 'order' as I need to use it for something
in the next part.
I am very confused as to how to do this.
--
View this message in context:
http://r
case I'd just create a vector of
appropriate length and cbind it to the data frame or whatever.
John Kane
Kingston ON Canada
> -Original Message-
> From: linda_...@hotmail.co.uk
> Sent: Tue, 27 Nov 2012 12:47:15 -0800 (PST)
> To: r-help@r-project.org
> Subject: [R] O
I have a set of data with 2 columns: time, size.
There are 20 sets of data. The data is looking at whether the size of a seed
affects the time it takes to germinate.
How do I then create a numerical variable called 'order' with values 1 to 20
in order to plot a graph or order against time?
--
With similar data, since you didn't include reproducible example of your own:
> results <- matrix(c(53, 55, 37, 83), nrow=1)
> colnames(results) <- letters[1:4]
> results
a b c d
[1,] 53 55 37 83
> order(results)
[1] 3 1 2 4
> colnames(results)[order(results)]
[1] "c" "a" "b" "d"
On Fri
names(results)[order(results)]
Michael
On Fri, Dec 2, 2011 at 2:45 PM, Martin Bauer wrote:
> Hello,
>
>
> I have a matrix results with dimension 1x9 double matrix
>
> XLB XLE XLF XLI
> 1 53.3089 55.77923 37.64458 83.08646
>
> I'm trying to order
Hello,
I have a matrix results with dimension 1x9 double matrix
XLB XLE XLF XLI
1 53.3089 55.77923 37.64458 83.08646
I'm trying to order this matrix
> print(order(results))
[1] 3 1 2 4
how can the function order return the columnname XLF
17 matches
Mail list logo