Learn R Programming

natcpp (version 0.2)

c_listlengths: A simple function to compute the lengths of the elements of an R list

Description

A simple function to compute the lengths of the elements of an R list

Usage

c_listlengths(L)

Value

An integer vector containing the length of each element of L

Arguments

L

a list

Details

This is equivalent to the base::lengths however it it much faster for long lists (and somewhat slower for short ones).