Method 2 : Using append() function

By using append() function we can combine lists

Syntax:

append(list1,list2,list3,.,listn)

Example: R program to combine lists using append() function

R




# create list1 
list1=list(names=c('sravan','bobby','ojaswi'),
           marks=c(100,89,76))
  
# create list2 
list2=list(names=c('rohith','gnanesh','satwik'),
           marks=c(96,89,70))
  
# combine lists using append() function
final_list=append(list1,list2)
  
# display list
print(final_list)


Output:

How to Combine Lists in R

In this article, we will discuss to see how to combine the Lists in R programming language.

Similar Reads

Method 1: Using c() function

We can combine lists by appending the lists using c() function....

Method 2 : Using append() function

...

Method 3 : Using mapply() function

By using append() function we can combine lists...

Method 4 : Using map() function

...

Contact Us