[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-760311-105":3,"doc-detail-760311-en":84,"detail-sidebar-cat-0-en-105":118,"doc-similar-760311":165},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":77,"head_meta":79,"extra_data":81,"updated_unix":83},105,"en","a-very-short-introduction-to-r-introductory-guide","A (very) short introduction to R - Introductory guide","","A short, beginner-friendly introduction to R for statistical computing and graphics, outlining why R is widely used in education and research. It explains key advantages such as being free and having extensive online help, and compares it to other tools like S, MATLAB, and programming languages such as C++ or Fortran. The guide also walks through getting started with installing R and RStudio, understanding RStudio layout, setting the working directory, and using packages.",{"@graph":14,"@context":76},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/a-very-short-introduction-to-r-introductory-guide/760311/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/a-very-short-introduction-to-r-introductory-guide/760311.png","ImageObject",300,407,{"name":42,"@type":43},"pop out","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-29","2026-11-28",true,{"@type":52,"interactionType":53,"userInteractionCount":22},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68,72],{"name":59,"@type":60,"acceptedAnswer":61},"What is R used for?","Question",{"text":62,"@type":63},"R is used for statistical computing and for creating graphics, and it is commonly used as an educational and research tool.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"Is R free to use?",{"text":67,"@type":63},"Yes. R is freeware and widely supported with help resources available online.",{"name":69,"@type":60,"acceptedAnswer":70},"How do you set the working directory in R?",{"text":71,"@type":63},"Use the command setwd(\"directoryname\") in the command window, for example setwd(\"M:/Hydrology/R/\").",{"name":73,"@type":60,"acceptedAnswer":74},"What are packages in R?",{"text":75,"@type":63},"Packages (also called libraries) organize statistical and data analysis functionality, and you can list installed packages and load them using functions like library().","https://schema.org",{"og:url":32,"og:type":78,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":80,"canonical":32},"index,follow",{"doc_id":82,"site_id":7},760311,1795899496,{"code":4,"msg":85,"data":86},"success",{"doc_id":82,"user_id":87,"nickname":42,"user_avatar":88,"doc_module":4,"category_id":89,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":90,"file_id":91,"file_url":92,"file_type":93,"file_size":94,"view_count":22,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":95,"language":96,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":97,"faqs":98,"seo_title":99,"seo_description":12,"update_tm":83,"read_time":100,"preview_page_count":33,"preview_urls":101},962090760408,"https://ap-avatar.wpscdn.com/davatar_085a072bc5b1113ac321206ff7593b45",6,"A (very) short introduction to R  \nPaul Torfs & Claudia Brauer Hydrology and Quantitative Water Management Group  \nWageningen University, The Netherlands  \n3 March 2014  \n1 Introduction  \nR is a powerful language and environment for statistical computing and graphics. It is a public domain (a so called \\GNU\") project which is similar to the commercial S language and environment which was developed at Bell Laboratories (formerly AT&T, now Lucent Technologies) by John Chambers and colleagues. R can be considered asa di􀀋erent implementation of S, and is much used in as an educational language and research tool.  \nThe main advantages of R are the fact that Ris freeware and that there is a lot of help available online. It is quite similar to other programming packages such as MatLab (not freeware), but more user-friendly than programming languages such as C++ or Fortran. You can use R as it is, but for educational purposes we prefer to use R in combination with the RStudio interface (also freeware), which has an organized layout and several extra options.  \nThis document contains explanations, examples and exercises, which can also be understood (hopefully) by people without any programming experience. Going through all text and exercises takes about 1 or 2 hours. Examples of frequently used commands and error messages are listed on the last two pages of this document and can be used as a reference while programming.  \n2 Getting started  \n2.1 Install R  \nTo install R on your computer (legally for free!), go to the home website of R􀀃:  \n􀀃 On the R-website you can also 􀀌nd this document: [http://cran.r-project.org/doc/contrib/Torfs](http://cran.r-project.org/doc/contrib/Torfs)+ Brauer-Short-R-Intro.pdf  \n[http://www.r-project.org/](http://www.r-project.org/)  \nand do the following (assuming you work on a windows computer):  \n􀀏 click download CRAN in the left bar  \n􀀏 choose a download site  \n􀀏 choose Windows as target operation system  \n􀀏 click base  \n􀀏 choose Download R 3 .0 .3 for Windows y and choose default answers for all questions  \nIt is also possible to run R and RStudio from a USB stick instead of installing them. This could be useful when you don't have administrator rights on your computer. See our separate note \\How to use portable versions of R and RStudio\"for help on this topic.  \n2.2 Install RStudio  \nAfter 􀀌nishing this setup, you should see an \"R\"icon on you desktop. Clicking on this would startup the standard interface. We recommend, however, to use the RStudio interface. z To install RStudio, go to:  \n[http://www.rstudio.org/](http://www.rstudio.org/)  \nand do the following (assuming you work on a windows computer):  \n􀀏 click Download RStudio  \n􀀏 click Download RStudio Desktop  \n􀀏 click Recommended For Your System  \n􀀏 download the .exe 􀀌le and run it (choose default answers for all questions)  \n2.3 RStudio layout  \nThe RStudio interface consists of several windows (see Figure 1) .  \n􀀏 Bottom left: console window (also called command window) . Here you can type simple commands after the \\>\" prompt and R will then execute your command. This is the most important window, because this is where R actually does stu􀀋.  \n􀀏 Top left: editor window (also called script window) . Collections of commands (scripts) can be edited and saved. When you don't get  \nyAt the moment of writing 3 .0.3 was the latest version. Choose the most recent one.  \nz There are many other (freeware) interfaces, such as TinnR.  \nFigure 1 The editor, workspace, console and plots windows in RStudio.  \nthis window, you can open it with File ! New ! R script  \nJust typing a command in the editor window is not enough, it has to get into the command window before R executes the command. If you want to run a line from the script window (or the whole script), you can click Run or press CTRL+ENTER to send it to the command window.  \n􀀏 Top right: workspace / history window. In the workspace window you can see which data and values R has in its memory. You can v","cbCaipXmDxcOxDPA","https://ap.wps.com/l/cbCaipXmDxcOxDPA","pdf",375263,12,"English","# 1 Introduction\n## 2 Getting started\n### 2.1 Install R\n### 2.2 Install RStudio\n### 2.3 RStudio layout\n### 2.4 Working directory\n### 2.5 Libraries","[{\"question\":\"What is R used for?\",\"answer\":\"R is used for statistical computing and for creating graphics, and it is commonly used as an educational and research tool.\"},{\"question\":\"Is R free to use?\",\"answer\":\"Yes. R is freeware and widely supported with help resources available online.\"},{\"question\":\"How do you set the working directory in R?\",\"answer\":\"Use the command setwd(\\\"directoryname\\\") in the command window, for example setwd(\\\"M:/Hydrology/R/\\\").\"},{\"question\":\"What are packages in R?\",\"answer\":\"Packages (also called libraries) organize statistical and data analysis functionality, and you can list installed packages and load them using functions like library().\"}]","A (very) short introduction to R - Introductory guide | PDF",30,[102,106,110,114],{"page_no":22,"url":103,"width":104,"height":105},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-28/5983afb23087f61bf1ba5b252b51fbb6.webp",983,1390,{"page_no":26,"url":107,"width":108,"height":109},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-28/1ed734813df2634e3101f8f1ff095893.webp",982,1388,{"page_no":30,"url":111,"width":112,"height":113},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-28/f6a24bfabad7871b909c8d36c611ec8a.webp",981,1387,{"page_no":33,"url":115,"width":116,"height":117},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-28/261b9344c916b4e0827b90ee90db3d56.webp",980,1385,{"code":4,"msg":85,"data":119},[120,124,128,132,137,140,145,149,154,157,161],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":122,"slug":123},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":126,"slug":127},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":130,"slug":131},"Exam",70,"exam",{"id":133,"doc_module":4,"doc_module_name":25,"category_name":134,"show_sort_weight":135,"slug":136},5,"Comic",60,"comic",{"id":89,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":138,"slug":139},50,"technology",{"id":141,"doc_module":4,"doc_module_name":25,"category_name":142,"show_sort_weight":143,"slug":144},7,"Healthcare",40,"healthcare",{"id":146,"doc_module":4,"doc_module_name":25,"category_name":147,"show_sort_weight":100,"slug":148},8,"Research & Report","research-report",{"id":150,"doc_module":4,"doc_module_name":25,"category_name":151,"show_sort_weight":152,"slug":153},9,"Religion & Spirituality",20,"religion-spirituality",{"id":152,"doc_module":4,"doc_module_name":25,"category_name":155,"show_sort_weight":152,"slug":156},"World Cup","world-cup",{"id":158,"doc_module":4,"doc_module_name":25,"category_name":159,"show_sort_weight":158,"slug":160},10,"Lifestyle","lifestyle",{"id":162,"doc_module":4,"doc_module_name":25,"category_name":163,"show_sort_weight":133,"slug":164},19,"General","general",{"list":166,"token":11},[167,174,180,186,192,198,204,211,217,224],{"doc_id":168,"doc_title":169,"file_type":93,"home_preview_img_url":170,"slug":171,"view_count":172,"category_name":29,"create_tm":173},399118,"R Guide - Technical Setup - Get Up and Running","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229919341006/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167679&Signature=uuVXueBhOe04uzmdWRLFpfPixiA%3D","r-guide-technical-setup-get-up-and-running",15,1790493026,{"doc_id":175,"doc_title":176,"file_type":93,"home_preview_img_url":177,"slug":178,"view_count":30,"category_name":29,"create_tm":179},701086,"Getting Started with R Markdown - A Short Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011578532/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167679&Signature=dgfrImNoqp%2FPALMW82bLQlgvC1k%3D","getting-started-with-r-markdown-a-short-introduction",1794523303,{"doc_id":181,"doc_title":182,"file_type":93,"home_preview_img_url":183,"slug":184,"view_count":146,"category_name":29,"create_tm":185},676157,"HP LaserJet 5 Printer - Getting Started Guide - Installation Checklist","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229993224829/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167679&Signature=6uGOMm7QwoCXgC8%2BB369mBsOYO4%3D","hp-laserjet-5-printer-getting-started-guide-installation-checklist",1793775011,{"doc_id":187,"doc_title":188,"file_type":93,"home_preview_img_url":189,"slug":190,"view_count":33,"category_name":29,"create_tm":191},696154,"Spring Boot Reference Guide - Version 1.1.0 M2 - reference guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230009756795/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167679&Signature=nfeeEecl3hgQEYMWIjW8SP7CSn8%3D","spring-boot-reference-guide-version-110-m2-reference-guide",1794431587,{"doc_id":193,"doc_title":194,"file_type":93,"home_preview_img_url":195,"slug":196,"view_count":22,"category_name":29,"create_tm":197},759798,"Node.js Notes for Professionals","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044485017/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167679&Signature=t4%2F%2F1AvKlKieu6PmxrbrkBF9nLc%3D","nodejs-notes-for-professionals",1795895079,{"doc_id":199,"doc_title":200,"file_type":93,"home_preview_img_url":201,"slug":202,"view_count":162,"category_name":29,"create_tm":203},290692,"A Little Book of R for Time Series - Release 0.2 - Install and Use R for Time Series Analysis","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229903739459/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167679&Signature=GZthou7lcv6CHpJ2GIS4DBw4ZSU%3D","a-little-book-of-r-for-time-series-release-02-install-and-use-r-for-time-series-analysis",1789642372,{"doc_id":205,"doc_title":206,"file_type":93,"home_preview_img_url":207,"slug":208,"view_count":209,"category_name":29,"create_tm":210},562469,"MASTERTRACE MS-2101 HEAT TRACING CONTROL - Operator’s Manual","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947812475/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167679&Signature=cSq7dwI6ThpfLETqr3NsW6wzduE%3D","mastertrace-ms-2101-heat-tracing-control-operators-manual",11,1791808701,{"doc_id":212,"doc_title":213,"file_type":93,"home_preview_img_url":214,"slug":215,"view_count":89,"category_name":29,"create_tm":216},687942,"Logi K950 - Getting Started","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001265712/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167679&Signature=drq9oYN4SVSAzoAlmVvDErNzsw8%3D","logi-k950-getting-started",1794085580,{"doc_id":218,"doc_title":219,"file_type":93,"home_preview_img_url":220,"slug":221,"view_count":222,"category_name":29,"create_tm":223},561741,"FLIP - Installation Guide - Load and Flash HEX File","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947773186/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167679&Signature=id1JBV8xAvlvTVFbl4utyBGB23k%3D","flip-installation-guide-load-and-flash-hex-file",13,1791806812,{"doc_id":225,"doc_title":226,"file_type":93,"home_preview_img_url":227,"slug":228,"view_count":33,"category_name":29,"create_tm":229},686682,"User Guide - Tablet Setup and Features","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001074116/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167679&Signature=fYI6VDO9afXttoaXQJRfHY9PVQI%3D","user-guide-tablet-setup-and-features",1794060332]