{"id":175857,"date":"2020-09-25T15:33:00","date_gmt":"2020-09-25T19:33:00","guid":{"rendered":"https:\/\/ibkrcampus.com\/trading-lessons\/introduction-to-r-and-rstudio\/"},"modified":"2023-04-25T20:56:07","modified_gmt":"2023-04-26T00:56:07","slug":"introduction-to-r-and-rstudio","status":"publish","type":"trading-lessons","link":"https:\/\/www.interactivebrokers.com\/campus\/trading-lessons\/introduction-to-r-and-rstudio\/","title":{"rendered":"Introduction to R and RStudio"},"content":{"rendered":"<p>Congratulations for enrolling in this course on Trading using R! We are sure that the course videos and the study material will be of great help in your goal for trading using R on Interactive Brokers platform. The course study notes have been divided into a number of lessons and have been designed in an easyto-understand language. Let\u2019s get rolling and start off with the first lesson on introduction to R and RStudio.<\/p>\n<h4>In this lesson, you would:<\/h4>\n<p>\u2022 Get introduced to R and RStudio<\/p>\n<p>\u2022 Know the difference between R and RStudio<\/p>\n<p>\u2022 Learn the benefits of using R for automated trading<\/p>\n<h4>What is R?<\/h4>\n<p>R is a programming language used for scientific computing and graphics. The roots of R language can be found in the S programming language which was developed at Bell laboratories in the 1970s, mainly by John Chambers. The R language was conceived in the early 1990s by Ross Ihaka and Robert Gentleman. R also refers to the software environment which is used to run the programs written in R. The R environment is free and open-source software. R as a programming language has gained wide popularity in recent years and it ranks among the top programming languages for data science. This popularity has resulted on account of various factors like ease-to-learn, excellent data manipulation and visualization tools, thousands of contributed packages on CRAN (Comprehensive R Archive Network), ability to create your own packages, and a large developer community.<\/p>\n<h4>What is RStudio?<\/h4>\n<p>RStudio is an integrated development environment (IDE) that helps you develop programs in R. An integrated development environment (IDE) is a software application that provides a facility to programmers for easy software development. An IDE normally consists of a source code editor, build automation tools and a debugger. There are other IDEs for R like Visual Studio and Eclipse, however, RStudio is considered to be the best available IDE for R programming.<\/p>\n<h4>Difference between R and RStudio<\/h4>\n<p>It is important that you understand the difference between R and RStudio. You can use R without using RStudio IDE, but you cannot use RStudio without using R. In the RStudio configuration, an R version is required to be set which is usually auto-set by RStudio when it is installed. RStudio makes it easy for writing programs in R but it is not a must to use R.<\/p>\n<h4>Benefits of using R for Automated Trading<\/h4>\n<p>R has found application in numerous fields like Finance, Marketing, Manufacturing, Retail, Bio Science etc. Given its excellent data manipulation and visualization tools, it has also been successfully used for automated trading in financial markets. Following are the benefits of using R:<\/p>\n<ul>\n<li>Free and Open-source software<\/li>\n<li>Excellent built-in functions<\/li>\n<li>Thousands of Contributed packages<\/li>\n<li>Ability to create your own packages<\/li>\n<li>Availability of packages like Quantstrat, QuantTools and PerformanceAnalytics for backtesting and analyzing trading strategies<\/li>\n<li>Quick prototyping of back-tested strategies, thus requiring minimal code changes<\/li>\n<li>Ability to figure out the difference between real life and back-tested data<\/li>\n<\/ul>\n<h4>Summary<\/h4>\n<p>In this introductory lesson, we talked about R, RStudio, and listed the benefits of using R for automated trading. In the next lesson, we will explain the installation guidelines for R and RStudio.<\/p>\n<h4>Additional Resources<\/h4>\n<p><a href=\"https:\/\/cran.r-project.org\/web\/packages\/available_packages_by_name.html\" target=\"_blank\" rel=\"noopener noreferrer\">List of Contributed Packages on CRAN, sorted by name<\/a><\/p>\n<p><a href=\"https:\/\/cran.r-project.org\/web\/packages\/available_packages_by_date.html\" target=\"_blank\" rel=\"noopener noreferrer\">List of Contributed Packages on CRAN, sorted by data of publication<\/a><\/p>\n<p>Note &#8211; The IBrokers package provides native R access to Interactive Brokers Trader Workstation API<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this video, you will be introduced to R and RStudio and learn the benefits of using R for automated trading.<\/p>\n","protected":false},"author":688,"featured_media":221445,"parent":0,"comment_status":"open","ping_status":"open","template":"","meta":{"_acf_changed":false,"footnotes":""},"contributors-categories":[13654],"traders-academy":[13126,13128,13132],"class_list":{"0":"post-175857","1":"trading-lessons","2":"type-trading-lessons","3":"status-publish","4":"has-post-thumbnail","6":"contributors-categories-quantinsti","7":"traders-academy-intermediate-trading","8":"traders-academy-level","9":"traders-academy-trading-lesson"},"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 v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Archives | Traders&#039; Academy | IBKR Campus<\/title>\n<meta name=\"description\" content=\"In this video, you will be introduced to R and RStudio and learn the benefits of using R for automated trading.\" \/>\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\/trading-lessons\/175857\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introduction to R and RStudio\" \/>\n<meta property=\"og:description\" content=\"In this video, you will be introduced to R and RStudio and learn the benefits of using R for automated trading.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/trading-lessons\/introduction-to-r-and-rstudio\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-26T00:56:07+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Introduction to R and RStudio\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/trading-lessons\\\/introduction-to-r-and-rstudio\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/trading-lessons\\\/introduction-to-r-and-rstudio\\\/\",\n\t            \"name\": \"Introduction to R and RStudio\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/trading-lessons\\\/introduction-to-r-and-rstudio\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/trading-lessons\\\/introduction-to-r-and-rstudio\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/09\\\/mqdefault-12.jpg\",\n\t            \"datePublished\": \"2020-09-25T19:33:00+00:00\",\n\t            \"dateModified\": \"2023-04-26T00:56:07+00:00\",\n\t            \"description\": \"In this video, you will be introduced to R and RStudio and learn the benefits of using R for automated trading.\",\n\t            \"breadcrumb\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/trading-lessons\\\/introduction-to-r-and-rstudio\\\/#breadcrumb\"\n\t            },\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/trading-lessons\\\/introduction-to-r-and-rstudio\\\/\"\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\\\/trading-lessons\\\/introduction-to-r-and-rstudio\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/09\\\/mqdefault-12.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/09\\\/mqdefault-12.jpg\",\n\t            \"width\": 320,\n\t            \"height\": 180,\n\t            \"caption\": \"Introduction to R and RStudio\"\n\t        },\n\t        {\n\t            \"@type\": \"BreadcrumbList\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/trading-lessons\\\/introduction-to-r-and-rstudio\\\/#breadcrumb\",\n\t            \"itemListElement\": [\n\t                {\n\t                    \"@type\": \"ListItem\",\n\t                    \"position\": 1,\n\t                    \"name\": \"Academy Lessons\",\n\t                    \"item\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/trading-lessons\\\/\"\n\t                },\n\t                {\n\t                    \"@type\": \"ListItem\",\n\t                    \"position\": 2,\n\t                    \"name\": \"Introduction to R and RStudio\"\n\t                }\n\t            ]\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}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Archives | Traders' Academy | IBKR Campus","description":"In this video, you will be introduced to R and RStudio and learn the benefits of using R for automated trading.","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\/trading-lessons\/175857\/","og_locale":"en_US","og_type":"article","og_title":"Introduction to R and RStudio","og_description":"In this video, you will be introduced to R and RStudio and learn the benefits of using R for automated trading.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/trading-lessons\/introduction-to-r-and-rstudio\/","og_site_name":"IBKR Campus US","article_modified_time":"2023-04-26T00:56:07+00:00","twitter_card":"summary_large_image","twitter_title":"Introduction to R and RStudio","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/trading-lessons\/introduction-to-r-and-rstudio\/","url":"https:\/\/www.interactivebrokers.com\/campus\/trading-lessons\/introduction-to-r-and-rstudio\/","name":"Introduction to R and RStudio","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/trading-lessons\/introduction-to-r-and-rstudio\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/trading-lessons\/introduction-to-r-and-rstudio\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/09\/mqdefault-12.jpg","datePublished":"2020-09-25T19:33:00+00:00","dateModified":"2023-04-26T00:56:07+00:00","description":"In this video, you will be introduced to R and RStudio and learn the benefits of using R for automated trading.","breadcrumb":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/trading-lessons\/introduction-to-r-and-rstudio\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/trading-lessons\/introduction-to-r-and-rstudio\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/trading-lessons\/introduction-to-r-and-rstudio\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/09\/mqdefault-12.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/09\/mqdefault-12.jpg","width":320,"height":180,"caption":"Introduction to R and RStudio"},{"@type":"BreadcrumbList","@id":"https:\/\/www.interactivebrokers.com\/campus\/trading-lessons\/introduction-to-r-and-rstudio\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Academy Lessons","item":"https:\/\/ibkrcampus.com\/campus\/trading-lessons\/"},{"@type":"ListItem","position":2,"name":"Introduction to R and RStudio"}]},{"@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\/"}]}},"_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/trading-lessons\/175857","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/trading-lessons"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/trading-lessons"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/688"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=175857"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/trading-lessons\/175857\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/221445"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=175857"}],"wp:term":[{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=175857"},{"taxonomy":"traders-academy","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/traders-academy?post=175857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}