Posting in HTML makes it much harder for people to figure out your code.

Maybe this will help:

> c<-list(a=seq(1:5),b=seq(10:20))

> c[[1]]
[1] 1 2 3 4 5
> c[[2]]
 [1]  1  2  3  4  5  6  7  8  9 10 11

> names(c[[1]])
NULL
> names(c[[2]])
NULL

On Thu, Feb 25, 2016 at 4:15 PM, Mohammad Tanvir Ahamed via R-help
<r-help@r-project.org> wrote:
> Hello,
> I want to get object name of a list inside lapply
>> c<-list(a=seq(1:5),b=seq(10:20))> lapply(c,names)$aNULL
> $bNULL
> Why NULL ?
> but i am expecting the names of object . Any help will be appreciated .
> I want to grab the names of object inside lapply for further process.
> Thanks .
>
>  Tanvir Ahamed
>    Göteborg, Sweden     |  mashra...@yahoo.com
>         [[alternative HTML version deleted]]
>

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to