R: Return array indices where expression is true

where {huxtable} | R Documentation

## Return array indices where expression is true

### Description

This is a simple wrapper around `which(..., arr.ind = TRUE)`, for use in `row specifications`.

### Usage

    where(expr)

### Arguments

`expr` | An R expression

### Value

A matrix of row and column indices of cells where `expr` is `TRUE`.

### Examples

    ht <- hux(a = 1:3, b = 4:6, add_colnames = TRUE)
    where(ht > 2)
    where(is_a_number(ht))

[Package huxtable version 3.0.0 Index]