Skip to content
Prev 199645 / 398506 Next

Find the first values in vector

Try this:

head(vec, sum(cumprod(vec)))

The positions:

which(head(vec, sum(cumprod(vec))))
On Mon, Nov 9, 2009 at 4:44 PM, Grzes <gregorio99 at gmail.com> wrote: