# 7-5 Accessing recursive list elements

# Create two sublists

list1<-list(1,2)
list2<-list("a","b")

# Combine the sublists into a recursive list structure
# The tags nums and lets identify the sublists

mylist<-list(nums=list1,lets=list2)

# Display mylist

mylist

# Access the nums sublist using its tag

mylist$nums

# Access the lets sublist using its index

mylist[[2]]

# Access the first element of nums using a tag

mylist$nums[[1]]

# Access the second element of lets using its indices

mylist [[2]] [[2]]
