Difference between List(list1,list2) and c(list1,list2) in R

0 votes
Difference between list (list1,list2) and c (list1,list2) in R? where list1 and list2 are separate lists.
Jun 21 in Data Analytics by Deepa
145 views

1 answer to this question.

0 votes

Hi Deepa,

It's quite simple, let me explain through an example below - 

I created 2 lists above as list1, list2.

As per question, I created list3 using list(list1, list2) and created list4 using c(list1, list2).

The difference between them is the way they store the lists in the memory, i.e list3 stores copy of  list1,2 as the list members.Whereas list4 stores the list elements in single list with all list elements

Hope you understood.

answered Jun 26 by Cherukuri
• 32,260 points

Related Questions In Data Analytics

0 votes
1 answer
0 votes
1 answer

Difference between list(1:5) and list(1,2 ...5) in R.

It's very simple. list(1:4) creates a single element(vector) whereas ...READ MORE

answered Oct 14 in Data Analytics by rajeev
38 views
0 votes
1 answer

What is the difference between library () and require () functions in R ?

 library() require() Library () function gives an error message ...READ MORE

answered Sep 5, 2018 in Data Analytics by zombie
• 3,710 points
106 views
0 votes
1 answer

Difference between factor and as.factor in R programming

Hey @Ali, as.factor is a wrapper for ...READ MORE

answered Oct 29, 2018 in Data Analytics by Maverick
• 10,040 points
565 views
0 votes
1 answer

By using dpylr package sum of multiple columns

Basically here we are making an equation ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
128 views
0 votes
1 answer

How to convert a text mining termDocumentMatrix into excel or csv in R?

By assuming that all the values are ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
184 views
0 votes
1 answer

In a dpylr pipline how to use sample and seq?

For avoiding rowwise(), I prefer to use ...READ MORE

answered Apr 6, 2018 in Data Analytics by DeepCoder786
• 1,720 points
91 views
0 votes
1 answer

How to create a list of Data frames?

Basically all we have to do is ...READ MORE

answered Apr 9, 2018 in Data Analytics by DeepCoder786
• 1,720 points
115 views
0 votes
1 answer

What is the difference between list and vector in R?

The difference are - A list holds different ...READ MORE

answered Oct 28 in Data Analytics by Cherukuri
• 32,260 points
358 views
0 votes
2 answers

What is the difference between %% and % in R programming?

HI, %% returns remainder in case of numeric ...READ MORE

answered Aug 26 in Data Analytics by anonymous
• 32,260 points
95 views