You can use mget
to get objects from the environment and put them in a list.
mget(VECTOR_OF_NAMES_OF_OBJECTS)
You can also combine mget
with ls()
so that you don't have to type the object names your self.
obj1 = 1:2
obj2 = 3:7
obj13 = 8:11
mget(ls(pattern = "obj\\d+"))
#$obj1
#[1] 1 2
#$obj13
#[1] 8 9 10 11
#$obj2
#[1] 3 4 5 6 7