Learn R Programming

ldat (version 0.3.3)

table: Give the `TRUE` indices of an lvec

Description

Give the `TRUE` indices of an lvec

Usage

table(...)

# S3 method for default table(...)

which(x, ...)

# S3 method for default which(x, ...)

# S3 method for 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

Run this code
# NOT RUN {
x <- as_lvec(runif(1E6) > 0.1)
which(x)

# }

Run the code above in your browser using DataLab