lengths: Backport of lengths for R < 3.2.0

View source: R/lengths.R

lengthsR Documentation

Backport of lengths for R < 3.2.0

Description

See the original description in base::lengths.

Usage

lengths(x, use.names = TRUE)

Examples

# get function from namespace instead of possibly getting
# implementation shipped with recent R versions:
bp_lengths = getFromNamespace("lengths", "backports")

bp_lengths(list(1:3, 2))

backports documentation built on June 24, 2024, 5:24 p.m.