{"id":75152,"date":"2020-01-04T17:12:02","date_gmt":"2020-01-04T11:42:02","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=75152"},"modified":"2020-01-04T17:12:02","modified_gmt":"2020-01-04T11:42:02","slug":"r-list","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/r-list\/","title":{"rendered":"R List &#8211; How to create, index and manipulate list components"},"content":{"rendered":"<p>In R, a list\u2019s components can be of any mode or type. Lists are objects that consist of an ordered collection of objects.<\/p>\n<p>Confused?<\/p>\n<p>In simple terms, lists are <strong>vectors<\/strong> that can contain elements of <strong>any type<\/strong>.<\/p>\n<p>R list can contain a string, a numeric variable, a vector, a matrix, an array, a function, and even another list.<\/p>\n<p>In this R list tutorial, we will explore the lists in the R programming language. We will learn how to create them and how to name their components. We will also learn how to index them, and how to manipulate their components. Our schedule is packed, so, let\u2019s get going!<\/p>\n<h2>How to Create Lists in R?<\/h2>\n<p>We can use the <strong>list()<\/strong> function to create a list.<\/p>\n<p><strong>For example:<\/strong><\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">&gt; list1 &lt;- list(2, \"hello\", c(3,5,4), 1:5, list(FALSE, c(\"this\", \"is\",\"a\",\"list\"),c(FALSE,TRUE,TRUE,TRUE,FALSE))) \n&gt; str(list1) #displays the structure of an object<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">List of 5<br \/>\n$ : num 2<br \/>\n$ : chr &#8220;hello&#8221;<br \/>\n$ : num [1:3] 3 5 4<br \/>\n$ : int [1:5] 1 2 3 4 5<br \/>\n$ :List of 3<br \/>\n..$ : logi FALSE<br \/>\n..$ : chr [1:4] &#8220;this&#8221; &#8220;is&#8221; &#8220;a&#8221; &#8220;list&#8221;<br \/>\n..$ : logi [1:5] FALSE TRUE TRUE TRUE FALSE<\/div>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-creating-a-list-list1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75171\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-creating-a-list-list1.png\" alt=\"R list - creating a list\" width=\"1299\" height=\"741\" \/><\/a><\/p>\n<p>Another way to create a list is to use the <strong>c()<\/strong> function. The c() function <strong>coerces<\/strong> elements into the same type, so, if there is a list amongst the elements, then all elements are turned into components of a list.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt; list2 &lt;- c(c(1,2),\"techvidvan\",list(c(FALSE,TRUE),rep(c(1,2,3),4))) \n&gt; str(list2)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">List of 5<br \/>\n$ : num 1<br \/>\n$ : num 2<br \/>\n$ : chr &#8220;techvidvan&#8221;<br \/>\n$ : logi [1:2] FALSE TRUE<br \/>\n$ : num [1:12] 1 2 3 1 2 3 1 2 3 1 &#8230;<\/div>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-creating-a-list-c-list2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-75173 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-creating-a-list-c-list2.png\" alt=\"R list creating\" width=\"1299\" height=\"741\" \/><\/a><\/p>\n<p>Notice that the vector and the list inside the c() function are not separate vector and list inside list2. Instead, their components have become list2\u2019s components. The c() function breaks down any objects with multiple elements.<\/p>\n<p>The c() function can combine two or more lists into one as well.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt; list3 &lt;- c(list1,list2) #combines list1 and list2 into list3 \n&gt; str(list3)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">List of 10<br \/>\n$ : num 2<br \/>\n$ : chr &#8220;hello&#8221;<br \/>\n$ : num [1:3] 3 5 4<br \/>\n$ : int [1:5] 1 2 3 4 5<br \/>\n$ :List of 3<br \/>\n..$ : logi FALSE<br \/>\n..$ : chr [1:4] &#8220;this&#8221; &#8220;is&#8221; &#8220;a&#8221; &#8220;list&#8221;<br \/>\n..$ : logi [1:5] FALSE TRUE TRUE TRUE FALSE<br \/>\n$ : num 1<br \/>\n$ : num 2<br \/>\n$ : chr &#8220;techvidvan&#8221;<br \/>\n$ : logi [1:2] FALSE TRUE<br \/>\n$ : num [1:12] 1 2 3 1 2 3 1 2 3 1 &#8230;<\/div>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-creating-a-list-combine-list3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-75174 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-creating-a-list-combine-list3.png\" alt=\"creating a list combine R list \" width=\"1299\" height=\"741\" \/><\/a><\/p>\n<h3>How to Name R List\u2019s Components?<\/h3>\n<p>We can name a list\u2019s components while creating it. This is similar to naming vector elements.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt; named_list1 &lt;- list(\"name\"=\"Bob\",\"wife name\"=\"julie\",\"age\"= 35,\"children\"=3,\"children age\"=c(4,7,9)) \n&gt; str(named_list1)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">List of 5<br \/>\n$ name : chr &#8220;Bob&#8221;<br \/>\n$ wife name : chr &#8220;julie&#8221;<br \/>\n$ age : num 35<br \/>\n$ children : num 3<br \/>\n$ children age: num [1:3] 4 7 9<\/div>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-naming-lists-named_list1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-75175 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-naming-lists-named_list1.png\" alt=\"naming R lists \" width=\"1299\" height=\"741\" \/><\/a><\/p>\n<p>We can also name a list\u2019s components after its creation by using the names() function.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt; details &lt;- list(\"jim\",\"jenny\",42,2,c(14,17))\n&gt; str(details)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">List of 5<br \/>\n$ : chr &#8220;jim&#8221;<br \/>\n$ : chr &#8220;jenny&#8221;<br \/>\n$ : num 42<br \/>\n$ : num 2<br \/>\n$ : num [1:2] 14 17<\/div>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt; names(details) &lt;- c(\"name\",\"wife name\",\"age\",\"children\", \"children age\")\n&gt; str(details)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">List of 5<br \/>\n$ name : chr &#8220;jim&#8221;<br \/>\n$ wife name : chr &#8220;jenny&#8221;<br \/>\n$ age : num 42<br \/>\n$ children : num 2<br \/>\n$ children age: num [1:2] 14 17<\/div>\n<div id=\"attachment_75176\" style=\"width: 1309px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-naming-list-names-details.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-75176\" class=\"wp-image-75176 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-naming-list-names-details.png\" alt=\"lists - naming list names details\" width=\"1299\" height=\"741\" \/><\/a><p id=\"caption-attachment-75176\" class=\"wp-caption-text\">naming R list details<\/p><\/div>\n<h3>Indexing a List<\/h3>\n<p>In a list, components are <strong>always numbered<\/strong>. We can refer to the components using those in double square brackets. So, we can refer to list1\u2019s components as list1[[1]], list1[[2]], etc..<\/p>\n<p>If there are elements within a list\u2019s components, then we can refer to them as list1[[1]][1] and so on.<\/p>\n<p>We can refer to an <a href=\"https:\/\/www.r-project.org\/\">R<\/a> list\u2019s components in a similar fashion to vectors by using logical, integer or character vectors.<\/p>\n<h4>Using logical vectors:<\/h4>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt; list2[c(F,F,T,F,T)] #index using logical vector<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">[[1]]<br \/>\n[1] &#8220;techvidvan&#8221;[[2]]<br \/>\n[1] 1 2 3 1 2 3 1 2 3 1 2 3<\/div>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-indexing-using-logical-vector.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-75177 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-indexing-using-logical-vector.png\" alt=\"indexing R list using logical vector\" width=\"1299\" height=\"741\" \/><\/a><\/p>\n<h4>Using positive integers:<\/h4>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt; list3[c(3:4)]        #index using positive integer vector<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">[[1]]<br \/>\n[1] 3 5 4<br \/>\n[[2]]<br \/>\n[1] 1 2 3 4 5<\/div>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-indexing-using-positive-integers.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-75178 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-indexing-using-positive-integers.png\" alt=\"indexing R list using positive integers\" width=\"1299\" height=\"741\" \/><\/a><\/p>\n<h4>Using negative integers:<\/h4>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt; list1[c(-2,-3,-5)]   #index using negative integers\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">[[1]]<br \/>\n[1] 2[[2]]<br \/>\n[1] 1 2 3 4 5<\/div>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-indexing-using-negative-integers-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-75187 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-indexing-using-negative-integers-1.png\" alt=\"indexing R list using negative integers\" width=\"1299\" height=\"741\" \/><\/a><\/p>\n<h4>Using character vectors for named lists:<\/h4>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt; named_list1[c(\"name\",\"age\")] #index using character vector<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">$name<br \/>\n[1] &#8220;Bob&#8221;$age<br \/>\n[1] 35<\/div>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-indexing-using-character-vectors.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-75179 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-indexing-using-character-vectors.png\" alt=\" indexing R list using character vectors\" width=\"1299\" height=\"741\" \/><\/a><\/p>\n<h3>How to Manipulate list in R?<\/h3>\n<p>We can change existing components in a list. We can also add new components and delete existing ones as well.<\/p>\n<h4>Modifying a component:<\/h4>\n<p>We can modify a component by accessing them through indexing and <strong>reassigning<\/strong> the new value.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt; details[[\"name\"]] &lt;- \"harry\" \n&gt; str(details)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">List of 5<br \/>\n$ name : chr &#8220;harry&#8221;<br \/>\n$ wife name : chr &#8220;jenny&#8221;<br \/>\n$ age : num 42<br \/>\n$ children : num 2<br \/>\n$ children age: num [1:2] 14 17<\/div>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-modify-component.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-75181 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-modify-component.png\" alt=\"modify R list component\" width=\"1299\" height=\"741\" \/><\/a><\/p>\n<h4>Adding a new component:<\/h4>\n<p>We can add a new component by assigning it to an <strong>unused index<\/strong>.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt; list1[[6]] &lt;- c(3,5,4,2,5,6) \n&gt; str(list1)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">List of 6<br \/>\n$ : num 2<br \/>\n$ : chr &#8220;hello&#8221;<br \/>\n$ : num [1:3] 3 5 4<br \/>\n$ : int [1:5] 1 2 3 4 5<br \/>\n$ :List of 3<br \/>\n..$ : logi FALSE<br \/>\n..$ : chr [1:4] &#8220;this&#8221; &#8220;is&#8221; &#8220;a&#8221; &#8220;list&#8221;<br \/>\n..$ : logi [1:5] FALSE TRUE TRUE TRUE FALSE<br \/>\n$ : num [1:6] 3 5 4 2 5 6<\/div>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-adding-a-new-component.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-75182 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-adding-a-new-component.png\" alt=\"R list adding new component\" width=\"1299\" height=\"741\" \/><\/a><\/p>\n<h4>Deleting a component:<\/h4>\n<p>We can delete a component by reassigning it to <strong>NULL<\/strong>.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt; list1[[6]] &lt;-NULL \n&gt; str(list1)<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<div class=\"code-output\">List of 5<br \/>\n$ : num 2<br \/>\n$ : chr &#8220;hello&#8221;<br \/>\n$ : num [1:3] 3 5 4<br \/>\n$ : int [1:5] 1 2 3 4 5<br \/>\n$ :List of 3<br \/>\n..$ : logi FALSE<br \/>\n..$ : chr [1:4] &#8220;this&#8221; &#8220;is&#8221; &#8220;a&#8221; &#8220;list&#8221;<br \/>\n..$ : logi [1:5] FALSE TRUE TRUE TRUE FALSE<\/div>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-deleting-components.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-75183 size-full\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/01\/lists-deleting-components.png\" alt=\"R list deleting components\" width=\"1299\" height=\"741\" \/><\/a><\/p>\n<h2>Summary<\/h2>\n<p>R Lists are very versatile data structures due to the lack of any restrictions placed on them. In this R list tutorial, we learn about lists. We learned about the different ways to create them. We learned how to access their components. We also learned how to modify, add, and delete components in a list.<\/p>\n<p>We hope that this article helped you understand lists in R and their workings.<\/p>\n<p>If you really like our efforts please comment down below and do check our sidebar for everything on R.<\/p>\n<p>Keep Learning!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In R, a list\u2019s components can be of any mode or type. Lists are objects that consist of an ordered collection of objects. Confused? In simple terms, lists are vectors that can contain elements&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":75162,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1020],"tags":[1262,1263,1264,1265,1266,1267,1252,1268],"class_list":["post-75152","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-r","tag-index-r-list","tag-lists-in-r","tag-make-a-list-in-r","tag-manipulate-r-lists","tag-named-list-r","tag-r-create-list","tag-r-list","tag-r-list-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>R List - How to create, index and manipulate list components - TechVidvan<\/title>\n<meta name=\"description\" content=\"List in R are vectors that contain elements of any type including string, numeric, vector, matrix, array,etc.Learn how to create, index &amp; manipulate R lists\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/r-list\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R List - How to create, index and manipulate list components - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"List in R are vectors that contain elements of any type including string, numeric, vector, matrix, array,etc.Learn how to create, index &amp; manipulate R lists\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/r-list\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-04T11:42:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/01\/lists-in-R.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"R List - How to create, index and manipulate list components - TechVidvan","description":"List in R are vectors that contain elements of any type including string, numeric, vector, matrix, array,etc.Learn how to create, index & manipulate R lists","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/r-list\/","og_locale":"en_US","og_type":"article","og_title":"R List - How to create, index and manipulate list components - TechVidvan","og_description":"List in R are vectors that contain elements of any type including string, numeric, vector, matrix, array,etc.Learn how to create, index & manipulate R lists","og_url":"https:\/\/techvidvan.com\/tutorials\/r-list\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2020-01-04T11:42:02+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/01\/lists-in-R.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/r-list\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/r-list\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"R List &#8211; How to create, index and manipulate list components","datePublished":"2020-01-04T11:42:02+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/r-list\/"},"wordCount":730,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/r-list\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/01\/lists-in-R.jpg","keywords":["Index R list","Lists in R","make a list in R","Manipulate r lists","named list r","R create list","r list","R List Tutorial"],"articleSection":["R Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/r-list\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/r-list\/","url":"https:\/\/techvidvan.com\/tutorials\/r-list\/","name":"R List - How to create, index and manipulate list components - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/r-list\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/r-list\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/01\/lists-in-R.jpg","datePublished":"2020-01-04T11:42:02+00:00","description":"List in R are vectors that contain elements of any type including string, numeric, vector, matrix, array,etc.Learn how to create, index & manipulate R lists","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/r-list\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/r-list\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/r-list\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/01\/lists-in-R.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/01\/lists-in-R.jpg","width":802,"height":420,"caption":"R list"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/r-list\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"R List &#8211; How to create, index and manipulate list components"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/75152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=75152"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/75152\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/75162"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=75152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=75152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=75152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}