| firstZeroIndex | R Documentation |
For each column, returns the 1-based index of the first zero value. If a column contains no zeros, returns NA for that column.
firstZeroIndex(mat)
mat |
NumericMatrix |
IntegerVector of length ncol(mat) with 1-based indices or NA.
m <- matrix(c(1, 0, 2,0, 3, 1),nrow = 3, ncol = 2)
firstZeroIndex(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.