[R] (no subject)

Ranjan Maitra maitra at iastate.edu
Sat Apr 18 21:39:53 CEST 2009


Welcome to R!

I don't quite know what you mean by size order. But if you have five
numbers:

a <- c(2, 1, 3, 5, 4)

then sort(a)

will do what you want?

HTH!
Ranjan


On Sat, 18 Apr 2009 14:46:04 +0000 Dan Cary <daniel_cary at hotmail.co.uk>
wrote:

> 
> Hi, as a newcomer to R i have what probably is a very simple issue but i have been to solve it for hours:
> all i want to know is how to arrange a set of numbers in size order without putting them in a table. just arranging them from for e.g. 2,1,3,5,4 into 1,2,3,4,5 - it must be simple but i cant find how to do it anywhere
> thanksdan
> _________________________________________________________________
> [[elided Hotmail spam]]
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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.
>




More information about the R-help mailing list