keys-get: Get keys

keys-getR Documentation

Get keys

Description

Functions for getting information about keys.

Usage

keys(.tbl)

raw_keys(.tbl)

has_keys(.tbl)

Arguments

.tbl

Reference data frame.

Value

keys() always returns a tibble of keys. In case of no keys it returns a tibble with number of rows as in .tbl and zero columns. raw_keys() is just a wrapper for attr(.tbl, "keys"). To know whether .tbl has keys use has_keys().

See Also

Set keys, Manipulate keys

Examples

keys(mtcars)

raw_keys(mtcars)

has_keys(mtcars)

df <- key_by(mtcars, vs, am)
keys(df)

has_keys(df)


keyholder documentation built on March 31, 2023, 5:37 p.m.