[R] counting number of objects in a list

Liaw, Andy andy_liaw at merck.com
Tue Jun 8 14:26:57 CEST 2004


Lists in the S language are like vectors, so length(mylist) would tell you
how many components there are in mylist.  Beware, though, that lists can
well be nested...

Andy

> From: Vumani Dlamini
> 
> Dear R-users;
> 
> I am interested in getting the number of objects in a list, 
> and have thus 
> far been unsuccessful. Can you please help.
> 
> Thank you.
> 
> Vumani




More information about the R-help mailing list