[R] Merge List element by name
Jeff Newmiller
jdnewmil at dcn.davis.CA.us
Sun Mar 8 02:51:35 CET 2015
This would be a perfect time for you to use best practices to convey what you have to us [1]... most specifically, posting using plain text will keep your code from getting munged up, and using dput to provide an unambiguous form we can put into our R sessions.
[1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
On March 7, 2015 2:01:57 PM PST, Mohammad Tanvir Ahamed via R-help <r-help at r-project.org> wrote:
>Hi, I have a list like below :
>> gg
>[[1]] assembly1 GCA_000257985
>[[2]] assembly1 GCA_000017125
>[[3]] assembly1 GCA_000016805
>[[4]] assembly1 GCA_000144955
>[[5]] assembly isolation.source1 GCA_000507725
> missing
>[[6]] assembly isolation.source1
>GCA_000507705 missing
>[[7]] assembly1 GCA_000237265
>[[8]] assembly location date host
> isolation.source1 GCA_000237125 Taiwan Jul-02
> Homo sapiens
>pus/wound##############################################################now
>i want merge the list element and want output as below as data frame
>Expected output :
>assembly location date host
> isolation.sourceGCA_000257985 NA NA NA
> NA
>GCA_000017125 NA NA NA NA
>GCA_000016805 NA NA NA NA
>GCA_000144955 NA NA NA NA
>GCA_000507725 NA NA NA
> missing
>GCA_000507705 NA NA NA
> missingGCA_000237265 NA NA NA
> NA
>GCA_000237125 Taiwan Jul-02 Homo sapiens pus/wound
>Any help will be very much appreciated . Thanks
>Best regards
>
>........................... Tanvir AhamedGöteborg, Sweden
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at 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.
More information about the R-help
mailing list