You can easily make lists of lists

list1 <- list(a = 2, b = 3)
list2 <- list(c = "a", d = "b")
mylist <- list(list1, list2)

mylist is now a list that contains two lists. To access list1 you can use mylist[[1]]. If you want to be able to something like mylist$list1 then you need to do somethingl like

mylist <- list(list1 = list1, list2 = list2)
# Now you can do the following
mylist$list1

Edit: To reply to your edit. Just use double bracket indexing

a <- list_all[[1]]
a[[1]]
#[1] 1
a[[2]]
#[1] 2
Answer from Dason on Stack Overflow
🌐
Statology
statology.org › home › how to create a list of lists in r (with example)
How to Create a List of Lists in R (With Example)
July 11, 2022 - #define lists list1 <- list(a=5, b=3) list2 <- list(c='A', d='B') #create list of lists list_of_lists <- list(list1, list2) The following example shows how to use this syntax in practice. The following code shows how to create a list that contains 3 lists in R:
Discussions

Handling lists of lists (of lists)
If you have lists of lists of data frames, can you join into a single data frame? Or several? dplyr::bind_rows(my list[[1]]) for example More on reddit.com
🌐 r/Rlanguage
2
3
October 29, 2023
List of lists of lists parsing
I tend to use the purrr package. The functions keep(), keep_at(), pluck() etc are extremely useful for these situations. If you have an example I (and others) can give you some specific tips. More on reddit.com
🌐 r/Rlanguage
29
3
October 28, 2024
Converting list of lists into data frame

library(jsonlite)

library(purrr)

library(data.table)

# This isn't strictly json - it's a file where each line is json

# Read data line by line

raw <- readLines("https://files.pushshift.io/reddit/comments/sample_data.json")

# Convert each line from json to a list

json_list <- map(raw, fromJSON)

# Convert each list to a data.table

dt_list <- map(json_list, as.data.table)

# Harness the power of rbind list

dt <- rbindlist(dt_list, fill = TRUE)

# Done

dt

# Here is the same thing in a single pipeline

dt2 <- readLines("https://files.pushshift.io/reddit/comments/sample_data.json") %>%

map(fromJSON) %>%

map(as.data.table) %>%

rbindlist(fill = TRUE)

# Happy to explain any steps - enjoy

More on reddit.com
🌐 r/rstats
16
10
November 7, 2018
Handling lists of lists (of lists)
Try map_df, which will output your map result in data frame format. Maybe not applicable to your current dilemma but I have found it helpful. There are other map variants that might get what you need better than a list. More on reddit.com
🌐 r/rstats
8
5
October 29, 2023
🌐
Reddit
reddit.com › r/rstats › handling lists of lists (of lists)
r/rstats on Reddit: Handling lists of lists (of lists)
October 29, 2023 -

I often use map() in my code, which gives output in list format. My data can be in the form of a list of lists containing dataframes, so I'm often getting the results of my code functionals in the form of lists of lists of lists (of vectors).

I find these multi-lists hard to manipulate and also to present results clearly when they're in this form. Is the many-list hierarchy a common side-effect of working in R? What are your common strategies for working with layers of lists?

🌐
Bioconnector
bioconnector.github.io › workshops › r-lists.html
List Manipulation
So you can have a list of a list of a list of a list of a list … · Garrett Grolemund and Hadley Wickham’s R For Data Science includes a section on lists. They use a helpful simile for the list as a shaker filled with packets of pepper1. To retrieve individual “grains” of pepper, you’d have to first access the shaker …
🌐
R-bloggers
r-bloggers.com › r bloggers › the ultimate guide to creating lists in r: from basics to advanced examples
The Ultimate Guide to Creating Lists in R: From Basics to Advanced Examples | R-bloggers
October 29, 2024 - List of 3 $ numbers: int [1:5] 1 2 3 4 5 $ text : chr "Hello" $ nested :List of 2 ..$ a: num 1 ..$ b: num 2 · Try creating a list with the following specifications: - Create a list named car_info - Include make (character), year (numeric), and features (character vector) - Add a price element after creation ... # Create the initial list car_info <- list( make = "Toyota", year = 2024, features = c("GPS", "Bluetooth", "Backup Camera") ) # Add price element car_info$price <- 25000 # Print the result print(car_info)
🌐
Datamentor
datamentor.io › r-programming › list
R Lists (With Examples)
To retrieve the content, we need to use [[. However, this approach will allow us to access only a single component at a time. x <- list(name = "John", age = 19, speaks = c("English", "French")) # access element by name using single bracket [] x["age"] # check the type of the result (single bracket returns a list) typeof(x["age"]) # access element by name using double bracket [[]] x[["age"]] # check the type of the result (double bracket returns the content) typeof(x[["age"]])
Find elsewhere
🌐
W3Schools
w3schools.com › r › r_lists.asp
R Lists
# List of strings thislist <- list("apple", "banana", "cherry") # Print the list thislist Try it Yourself » · You can access the list items by referring to its index number, inside brackets.
🌐
Arab Psychology
scales.arabpsychology.com › home › how to easily create a list of lists in r
How To Easily Create A List Of Lists In R
November 28, 2025 - While the original approach sometimes ... method in R for creating a list of lists is to directly pass the component lists as arguments to a single overarching list() function call....
🌐
TutorialsPoint
tutorialspoint.com › r › r_lists.htm
R - Lists
# Create a list containing a vector, a matrix and a list. list_data <- list(c("Jan","Feb","Mar"), matrix(c(3,9,5,1,-2,8), nrow = 2), list("green",12.3)) # Give names to the elements in the list. names(list_data) <- c("1st Quarter", "A_Matrix", "A Inner list") # Access the first element of the list. print(list_data[1]) # Access the thrid element. As it is also a list, all its elements will be printed. print(list_data[3]) # Access the list element using the name of the element. print(list_data$A_Matrix) When we execute the above code, it produces the following result −
🌐
Educative
educative.io › answers › how-to-create-a-list-of-lists-in-r
How to create a list of lists in R
The lists that are to be contained in another list can be created inline. Moreover, titles can be assigned to the list elements, as shown below. Note that mammals and amphibians are titles of the lists created inline. ... Copyright ©2026 Educative, Inc. All rights reserved
🌐
GeeksforGeeks
geeksforgeeks.org › r language › r-lists
R-Lists - GeeksforGeeks
July 12, 2025 - A list in R programming is a generic object consisting of an ordered collection of objects. Lists are one-dimensional, heterogeneous data structures. The list can be a list of vectors, a list of matrices, a list of characters, a list of functions, ...
🌐
Oxford University
mathcenter.oxford.emory.edu › site › math117 › rLists
R Lists
One can access the individual elements of a list in a variety of ways, using either the tag name or the position of the element in the list, as shown below: > my.list = list(name="Paul", height=6, likes.math=TRUE) > my.list$name [1] "Paul" > my.list[["name"]] [1] "Paul" > my.list[[1]] # <-- here we seek the element in position 1 (the first element) [1] "Paul" An important restriction on using the double square bracket in this way is that one can only access a single element of the list.
🌐
Reddit
reddit.com › r/rlanguage › handling lists of lists (of lists)
r/Rlanguage on Reddit: Handling lists of lists (of lists)
October 29, 2023 -

I often use map() in my code, which gives output in list format. My data can be in the form of a list of lists containing dataframes, so I'm often getting the results of my code functionals in the form of lists of lists of lists (of vectors).

I find these multi-lists hard to manipulate and also to present results clearly when they're in this form. Is the many-list hierarchy a common side-effect of working in R? What are your common strategies for working with layers of lists?

🌐
Learn By Example
learnbyexample.org › r-list
R List - Learn By Example
April 20, 2020 - lst <- list(1, "abc", 1.23, TRUE) str(lst) List of 4 $ : num 1 $ : chr "abc" $ : num 1.23 $ : logi TRUE · A list can contain sublists, which in turn can contain sublists themselves, and so on. This is known as nested list or recursive vectors.
🌐
RCODER
r-coder.com › home › r introduction › list in r
LIST in R language ⚡ [CREATE, COMPARE, JOIN, EXTRACT, ... ]
January 2, 2024 - What is a list in R? A list in R programming language is an ordered collection of any R objects. Thus, although the elements of vectors, matrix and arrays must be of the same type, in the case of the R list the elements can be of different type.
🌐
DataFlair
data-flair.training › blogs › r-list-tutorial
R List - Learn what all you can do with Lists in R! - DataFlair
May 8, 2024 - R list is the object which contains elements of different types – like strings, numbers, vectors and another list inside it. R list can also contain a matrix or a function as its elements. The list is created using the list() function in R.
🌐
IONOS
ionos.com › digital guide › websites › web development › r lists
An overview of R lists - IONOS
November 10, 2023 - R lists are a separate data type in R. Find out how to deal with lists and which are the top functions to know.
🌐
RDocumentation
rdocumentation.org › packages › base › versions › 3.6.2 › topics › list
list: Lists -- Generic and Dotted Pairs
The arguments to list or pairlist are of the form value or tag = value. The functions return a list or dotted pair list composed of its arguments with each value either tagged or untagged, depending on how the argument was specified.