tags:

views:

1791

answers:

2

Anyone know an R function that will return the number of items in a list?

Thanks

Karl

+6  A: 

length(x)

Joey
+2  A: 

I spent ages trying to figure this out but it is simple! You can use length. length(mylist) will tell you the number of objects "mylist" contains.

... and just realised someone had already answered this- sorry!

anon
It's still an answer, and still a valid one at that, so +1.
PaulHurleyuk