On 4/6/06 8:04 AM, "Sumanta Basak" <[EMAIL PROTECTED]> wrote:

> Hi All,
> 
> 
> 
> I have certain combinations for which I have some value, e.g.
> 
> 
> 
> 0 1         20
> 
> 0 2         15
> 
> 1 1         40
> 
> 1 2         52
> 
> 
> 
> Now I need to sort this list for which I'll get the combination against the
> lowest value. In this case, 15, and the combination will be 0 2.

See ?order.  You can use the ordering that you get from order() to grab the
appropriate entry in your matrix/data.frame.

Sean

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to