col_bracket: Subsets a data using bracket notation

View source: R/col_bracket.r

col_bracketR Documentation

Subsets a data using bracket notation

Description

A wrapper function for bracket notation on two-dimensional objects, with bracketing on the columns.

Usage

col_bracket(data_object, index, ...)

Arguments

data_object

a data object

index

a character, logical, or numeric vector

...

additional arguments passed to [

Value

a subset of the data

Examples

# load package
data(nhanes)

# look at the first few values of dmdborn4
nhanes |> col_bracket('dmdborn4') |> head()

baseverse documentation built on Oct. 27, 2026, 1:07 a.m.