Lengths of object elements
lengths(x, use.names = TRUE)
A non-negative integer of length length(x), except when any element has a length of more than 2^31 - 1 elements, when it returns a double vector. When use.names is true, the names are taken from the names on x, if any.
an object. If there is no method implemented for this object,
the base::lengths()
function is used.
logical indicating if the result should inherit the names from x.