which: Give the 'TRUE' indices of an lvec

Description Usage Arguments Value Examples

View source: R/which.R

Description

Give the 'TRUE' indices of an lvec

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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

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

ldat documentation built on March 26, 2020, 7:59 p.m.

Related to which in ldat...