backports (version 1.1.4)

lengths: Backport of lengths for R < 3.2.0

Description

See the original description in base::lengths.

Usage

lengths(x, use.names = TRUE)

Arguments

Examples

Run this code
# NOT RUN {
# 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))
# }

Run the code above in your browser using DataCamp Workspace