R Tutorial for Beginners 1.1: Introduction

R Tutorial for Beginners 1.1: Introduction

" RStudio  is a free and open-source integrated development environment (IDE) for  R, a programming language for statistical computing and graphics.  RStudio was founded by JJ Allaire, creator of the programming language ColdFusion. Hadley Wickham is the Chief Scientist at  RStudio."
Wikipedia



               Here's a look at how the RStudio main page looks like


 


1. On the top right is the "Environment" and the "History", they include current and previous projects created

  • You can save an environment for later use in case you had to clear it for a new project
  • You can clear all the items using the clear button on top of the environment tap
  • In the RScript area, you can use a command to delete specific items from the environment or all of them (the "rm" argument)


2. On the top left is the "Script Area" where you create and run scripts, here are some useful tips when creating a script in RStudio:

  • Sometimes you will need to put your own notes (especially when you are creating several scripts at the same time) to do so, please know that if you did not input the hashtag "#" sign before your notes, R will consider it as part of the code, so whenever you wish to put a note simply put # before it {e.g: # This code is for comparing price ranges}
  • To create a new R script, simply press on the "+" button and then select "new R script"
  • You can easily use the normal find or find/replace either by clicking on the search icon above the script or pressing "Ctrl+F", this will come in handy if you want to run a code several times changing only the variables
  • Once you are done writing a code, you can either select the part that you want to run and then click the "run" button on the top of the script area, or press "Ctrl+R"


3. On the bottom right is the packages manager. RStudio is built using many packages, added by developers, data scientists and statisticians, they are always updated on their local servers but only the most basic of the packages come with RStudio installations. That said, when you have a task to fulfill using the studio, you must locate the specialized package and downloaded using the "install.packages" command. It will then appear in this section where you can summon it to be active and manipulate data using its specific functions.

Details about each package and its functions are mentioned in this section, you can look for a specific package and investigate its functions further.


4. On the bottom left is the "Console" that is were the status of each run code is shown. This section is also considered a place to input and test codes, just like the RScript bit, the only difference is that here you cannot save the progress of the code if its a process, you can only run viable codes, also you cannot integrate your notes to the code in this section.

When running a code, any result is shown here, in case there was an error, R shows you whats wrong/missing from your statement for correction purposes. Sometimes an error code appears that requires further investigation so you can know what needs fixing.


Our team is putting together the projects done using R, in a format that would hopefully help in other processes, automating them and saving time.


In R Tutorial for Beginners 1.2 we will be discussing how to manage scripts in R Studio, assigning values to objects & removing them, a useful code written by me to extract a common gap in a specific data set and then create a new matrix consisting only of the incomplete variables for immediate correction.

要查看或添加评论,请登录

Wiam N.的更多文章

  • Beirut...

    Beirut...

    Beirut. What can I say about Beirut? She is the city that will always have my heart, my soul and my demons.

  • The Zero Carbon Footprint Ultimatum

    The Zero Carbon Footprint Ultimatum

    by: Wiam Nasr 27-02-2021 It might have been COVID that showed us how bad we've been hurting our planet and by extension…

  • Lemons and Lemonade - L & L

    Lemons and Lemonade - L & L

    25/02/2021 by: Wiam Nasr Our lemon tree grew out of hand, but we cannot sit together under it. Instead, each must share…

    2 条评论
  • R Tutorial for Beginners 1.4: Basic Data Manipulation

    R Tutorial for Beginners 1.4: Basic Data Manipulation

    Previously we went through importing data to R Studio, in this tutorial, we will be exploring basic ways to manipulate…

  • R Tutorial for Beginners 1.3: Importing Data to R

    R Tutorial for Beginners 1.3: Importing Data to R

    To kick start this part of the tutorial, its important to identify the file types that R can read/manipulate. We have 2…

  • R Tutorial for Beginners 1.2: Assigning Values to Objects and Matrices

    R Tutorial for Beginners 1.2: Assigning Values to Objects and Matrices

    In this tutorial, we will discuss Assigning Values to Objects in R, ways to make basic arithmetic functions and other…

社区洞察

其他会员也浏览了