TED] [mailto:[EMAIL PROTECTED]
On Behalf Of kate
Sent: Monday, 31 March 2008 1:53 PM
To: r-help@r-project.org
Subject: [R] Find the index for min of a matrix
Hi,
My example is as the following,
W<-matrix(c(2,4,2,8,1,3),ncol=3)
which(W==min(W))
I would like to find the index for min of the matri
Hi,
My example is as the following,
W<-matrix(c(2,4,2,8,1,3),ncol=3)
which(W==min(W))
I would like to find the index for min of the matrix W, i.e. (1, 3) instead of
5 as the output. What command could I use?
Thanks,
Kate
[[alternative HTML version deleted]]
2 matches
Mail list logo