{"id":205996,"date":"2024-05-03T09:54:34","date_gmt":"2024-05-03T13:54:34","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=205996"},"modified":"2024-05-06T13:23:25","modified_gmt":"2024-05-06T17:23:25","slug":"r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\/","title":{"rendered":"R: Collect the i-th or Last Rows of Each Data Frame in a List of Data Frames"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This post demonstrates\u00a0<strong>selecting either the last row or the i-th row from each data frame<\/strong>\u00a0in\u00a0<strong>a list of data frames<\/strong>\u00a0in R.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-the-i-th-or-last-rows-of-data-frames-within-a-list\">the i-th or last rows of data frames within a list<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the following R code, the function\u00a0<strong>collect_ith_or_last_rows()<\/strong>\u00a0provides a convenient method for selecting either the i-th or last rows of data frames within a list.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"r\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># list of data.frames or matrices\nlist_df_coef &lt;- list(\n    L = matrix(c(\n        -0.857, -0.806, -0.731, -0.645,\n        -0.260, -0.265, -0.262, -0.253,\n        -0.407, -0.413, -0.408, -0.395), \n        ncol = 4, byrow = TRUE),\n    S = matrix(c(\n        0.001, 0.002, 0.003, 0.004,\n        0.771, 0.772, 0.773, 0.774,\n        -0.015, -0.025, -0.035, -0.045), \n        ncol = 4, byrow = TRUE),\n    C = matrix(c(\n        -0.181, -0.178, -0.175, -0.172,\n        0.045, 0.045, 0.045, 0.045,\n        0.000, 0.001, 0.001, 0.001), \n        ncol = 4, byrow = TRUE)\n)\n \nlist_df_coef\n \n#---------------------------------------------------------------\n# When ith_row = i, it selects the ith rows.\n# When ith_row is NULL, it defaults to selecting the last rows.\n#---------------------------------------------------------------\ncollect_ith_or_last_rows &lt;- function(df_list, ith_row = NULL) {\n    # Function to get ith or last row of each data frame\n    if (is.null(ith_row)) {\n        get_selected_rows &lt;- function(df) {tail(df, n = 1)}\n    } else {\n        get_selected_rows &lt;- function(df) {df[ith_row,,drop=FALSE]}\n    }\n    # Apply the function to each data frame in the list\n    selected_rows &lt;- lapply(df_list, get_selected_rows)\n    # Combine the selected rows into one data frame\n    combined_df &lt;- do.call(rbind, selected_rows)\n    # Set row names based on the names of list ingredients\n    rownames(combined_df) &lt;- names(df_list)\n    return(combined_df)\n}\n \ncollect_ith_or_last_rows(list_df_coef, 1)\ncollect_ith_or_last_rows(list_df_coef)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The selected results are as follows:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"r\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&gt; \n&gt; list_df_coef\n$L\n       [,1]   [,2]   [,3]   [,4]\n[1,] -0.857 -0.806 -0.731 -0.645\n[2,] -0.260 -0.265 -0.262 -0.253\n[3,] -0.407 -0.413 -0.408 -0.395\n \n$S\n       [,1]   [,2]   [,3]   [,4]\n[1,]  0.001  0.002  0.003  0.004\n[2,]  0.771  0.772  0.773  0.774\n[3,] -0.015 -0.025 -0.035 -0.045\n \n$C\n       [,1]   [,2]   [,3]   [,4]\n[1,] -0.181 -0.178 -0.175 -0.172\n[2,]  0.045  0.045  0.045  0.045\n[3,]  0.000  0.001  0.001  0.001\n \n&gt; collect_ith_or_last_rows(list_df_coef, 1)\n    [,1]   [,2]   [,3]   [,4]\nL -0.857 -0.806 -0.731 -0.645\nS  0.001  0.002  0.003  0.004\nC -0.181 -0.178 -0.175 -0.172\n \n&gt; collect_ith_or_last_rows(list_df_coef)\n    [,1]   [,2]   [,3]   [,4]\nL -0.407 -0.413 -0.408 -0.395\nS -0.015 -0.025 -0.035 -0.045\nC  0.000  0.001  0.001  0.001\n&gt; <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Originally posted on the <a href=\"https:\/\/shleeai.blogspot.com\/2024\/04\/r-collect-i-th-or-last-rows-of-each.html\">SHLee AI Financial Model<\/a> blog.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the following R code, the function collect_ith_or_last_rows() provides a convenient method for selecting either the i-th or last rows of data frames within a list.<\/p>\n","protected":false},"author":662,"featured_media":195001,"comment_status":"open","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[339,343,338,341,342],"tags":[10598,806,11906,487,6591],"contributors-categories":[13728],"class_list":["post-205996","post","type-post","status-publish","format-standard","has-post-thumbnail","category-data-science","category-programing-languages","category-ibkr-quant-news","category-quant-development","category-r-development","tag-data-frames","tag-data-science","tag-matrices","tag-r","tag-rstats","contributors-categories-sh-fintech-modeling"],"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v28.1) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>R: Collect the i-th or Last Rows of Each Data Frame in a List of Data Frames<\/title>\n<meta name=\"description\" content=\"In the following R code, the function collect_ith_or_last_rows() provides a convenient method for selecting either the i-th or last rows of data frames...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/205996\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R: Collect the i-th or Last Rows of Each Data Frame in a List of Data Frames\" \/>\n<meta property=\"og:description\" content=\"In the following R code, the function collect_ith_or_last_rows() provides a convenient method for selecting either the i-th or last rows of data frames within a list.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2024-05-03T13:54:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T17:23:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/08\/r-splash-of-colors-background.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"563\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sang-Heon Lee\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sang-Heon Lee\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Sang-Heon Lee\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/0a959ff9de7f0465a07baa1fe1ae0200\"\n\t            },\n\t            \"headline\": \"R: Collect the i-th or Last Rows of Each Data Frame in a List of Data Frames\",\n\t            \"datePublished\": \"2024-05-03T13:54:34+00:00\",\n\t            \"dateModified\": \"2024-05-06T17:23:25+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\\\/\"\n\t            },\n\t            \"wordCount\": 97,\n\t            \"commentCount\": 0,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/08\\\/r-splash-of-colors-background.jpg\",\n\t            \"keywords\": [\n\t                \"data frames\",\n\t                \"Data Science\",\n\t                \"Matrices\",\n\t                \"R\",\n\t                \"rstats\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Quant\",\n\t                \"Quant Development\",\n\t                \"R Development\"\n\t            ],\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"CommentAction\",\n\t                    \"name\": \"Comment\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\\\/#respond\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\\\/\",\n\t            \"name\": \"R: Collect the i-th or Last Rows of Each Data Frame in a List of Data Frames | IBKR Campus US\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/08\\\/r-splash-of-colors-background.jpg\",\n\t            \"datePublished\": \"2024-05-03T13:54:34+00:00\",\n\t            \"dateModified\": \"2024-05-06T17:23:25+00:00\",\n\t            \"description\": \"In the following R code, the function collect_ith_or_last_rows() provides a convenient method for selecting either the i-th or last rows of data frames within a list.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/08\\\/r-splash-of-colors-background.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/08\\\/r-splash-of-colors-background.jpg\",\n\t            \"width\": 1000,\n\t            \"height\": 563,\n\t            \"caption\": \"Quant\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/0a959ff9de7f0465a07baa1fe1ae0200\",\n\t            \"name\": \"Sang-Heon Lee\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/sang-heonlee\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"R: Collect the i-th or Last Rows of Each Data Frame in a List of Data Frames","description":"In the following R code, the function collect_ith_or_last_rows() provides a convenient method for selecting either the i-th or last rows of data frames...","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:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/205996\/","og_locale":"en_US","og_type":"article","og_title":"R: Collect the i-th or Last Rows of Each Data Frame in a List of Data Frames","og_description":"In the following R code, the function collect_ith_or_last_rows() provides a convenient method for selecting either the i-th or last rows of data frames within a list.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\/","og_site_name":"IBKR Campus US","article_published_time":"2024-05-03T13:54:34+00:00","article_modified_time":"2024-05-06T17:23:25+00:00","og_image":[{"width":1000,"height":563,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/08\/r-splash-of-colors-background.jpg","type":"image\/jpeg"}],"author":"Sang-Heon Lee","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sang-Heon Lee","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\/"},"author":{"name":"Sang-Heon Lee","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/0a959ff9de7f0465a07baa1fe1ae0200"},"headline":"R: Collect the i-th or Last Rows of Each Data Frame in a List of Data Frames","datePublished":"2024-05-03T13:54:34+00:00","dateModified":"2024-05-06T17:23:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\/"},"wordCount":97,"commentCount":0,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/08\/r-splash-of-colors-background.jpg","keywords":["data frames","Data Science","Matrices","R","rstats"],"articleSection":["Data Science","Programming Languages","Quant","Quant Development","R Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\/","name":"R: Collect the i-th or Last Rows of Each Data Frame in a List of Data Frames | IBKR Campus US","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/08\/r-splash-of-colors-background.jpg","datePublished":"2024-05-03T13:54:34+00:00","dateModified":"2024-05-06T17:23:25+00:00","description":"In the following R code, the function collect_ith_or_last_rows() provides a convenient method for selecting either the i-th or last rows of data frames within a list.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/r-collect-the-i-th-or-last-rows-of-each-data-frame-in-a-list-of-data-frames\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/08\/r-splash-of-colors-background.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/08\/r-splash-of-colors-background.jpg","width":1000,"height":563,"caption":"Quant"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/0a959ff9de7f0465a07baa1fe1ae0200","name":"Sang-Heon Lee","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/sang-heonlee\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/08\/r-splash-of-colors-background.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/205996","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/662"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=205996"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/205996\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/195001"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=205996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=205996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=205996"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=205996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}