which: Give the 'TRUE' indices of an lvec

View source: R/which.R

tableR Documentation

Give the 'TRUE' indices of an lvec

Description

Give the 'TRUE' indices of an lvec

Usage

table(...)

## Default S3 method:
table(...)

which(x, ...)

## Default S3 method:
which(x, ...)

## S3 method for class 'lvec'
which(x, ...)

Arguments

...

not used

x

logical lvec to get the indices from

Value

Returns a numeric lvec with the indices of the elements of x that are TRUE.

Examples

x <- as_lvec(runif(1E6) > 0.1)
which(x)


djvanderlaan/lvec_stats documentation built on Oct. 4, 2022, 7:02 p.m.