[R] How to find the lenth of more than ten variables?

Jim Lemon jim at bitwrit.com.au
Mon Dec 3 11:51:52 CET 2012


On 12/03/2012 03:27 PM, killerkarthick wrote:
> Hi....
> I have one data set with 20 variables. I want to find the length of each
> variables at a time. Please help me ..
> Thanks in advance............
>
Hi killerkarthick,
This may do what you want:

unlist(lapply(my_data_set,length))

if the data set is a list.

Jim




More information about the R-help mailing list