Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

listLen

Lengths of list elements


Description

This function returns an integer vector with the length of the elements of its argument, which is expected to be a list.

Usage

listLen(x)

Arguments

x

A list

Details

This function returns a vector of the same length as the list x containing the lengths of each element.

The current implementation is intended for lists containing vectors and the C-level length function is used to determine length. This means no dispatch is done for the elements of the list. If your list contains S4 objects, you should use sapply(x, length) instead.

Author(s)

Jeff Gentry and R. Gentleman

See Also

Examples

foo = lapply(1:8, rnorm)
  listLen(foo)

Biobase

Biobase: Base functions for Bioconductor

v2.50.0
Artistic-2.0
Authors
R. Gentleman, V. Carey, M. Morgan, S. Falcon
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.