extract a specific column in a nested list (extract from all sub lists)

I have a big list that has a lot of sub-lists.
I would like to search for a specific column name and extract that column from every sub-list.
for example: please see the attached image, I have a big list named "List1", it has several sub-lists, for example, "gene A", "gene B", ...., "gene N". each of these sublists has a list, for example, "gene A" has these columns: a, b, c, ...... . "gene B" has a, d, ... z.
How can I search "a" in all those sublists and finally reach all of them beside each other in a data frame?


(l1 <- list(
  gene_A = list(a=1:3,
  gene_B = list(a=9:7,

1 Like

Thank you @nirgrahamuk , it worked.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.