Skip to content
Prev 242989 / 398500 Next

how to find a row index in a matrix or a data frame ?

On Thu, Nov 25, 2010 at 4:59 AM, Luedde, Mirko <mirko.luedde at sap.com> wrote:
Try this:

   which(apply(t(x) == r, 2, all))

or this:

   which(colSums((t(x) != r) > 0) == 0)