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))

r-lib/backports documentation built on Aug. 13, 2024, 8:48 a.m.