Hi Worik,
See ?which.min
x <- matrix(c(7, 7, 9, 7, 7, 9, 2, 9), ncol = 2, byrow = FALSE)
which.min(x[,2])
x[which.min(x[,2]), ]
HTH,
Jorge
On Wed, May 18, 2011 at 10:38 PM, Worik R <> wrote:
> Friends
>
> If I have a matrix such as...
>
> [,1] [,2]
> [1,]77
> [2,]79
> [3,]
Friends
If I have a matrix such as...
[,1] [,2]
[1,]77
[2,]79
[3,]9 2
[4,]79
And I want to find the row number that has the minimum value of column 2
(row 3 in this case) how can I do it? Is there a simple way?
cheers
Worik
[[alternative HTML versio
2 matches
Mail list logo