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

len

Length of an Object


Description

Get the length of vectors (including lists) and factors, and of any other object for which a method has been defined.

Usage

len(...)

Arguments

...

object

Details

len() cannot reset the length of a vector, while length() could.

Value

For vectors (including lists) and factors the length is the number of elements. For an environment it is the number of objects in the environment, and NULL has length 0. For expressions and pairlists (including language objects and dotlists) it is the length of the pairlist chain. All other objects (including functions) have length one: note that for functions this differs from S.

Author(s)

Knut M. Wittkowski kmw@rockefeller.edu

Examples

len(c(1:20))

muStat

Prentice Rank Sum Test and McNemar Test

v1.7.0
GPL (>= 2)
Authors
Knut M. Wittkowski <kmw@rockefeller.edu> and Tingting Song <ttsong@gmail.com>
Initial release
2010-09-17

We don't support your browser anymore

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