title: How to find the first non-zero element in each row of a matrix in r?
body: <p>I have a large matrix 10000x3000 and I would like to locate the first non-zero element in each row. Any help will be appreciated.</p>