Skip to main content

Getting Started with R-Studio

1. Get Started

R-studio is a popular IDE for R-programming language. It comes up with a console, syntax-highlighting editor, through which one can directly execute the code. It comprises of different tools for plotting, debugging, history and workspace management. It is open-source and also available as commercial editions. It can run on desktop and even browsers.

Most of the developers struggle while installing the R-studio. If it is not properly installed then all your codes fail to execute. Even if it is installed successfully, it has issues of crashing. Sometimes it won't even start. But if you are using the R-studio available on Katonic's MLops Platform you will not come across such problems. Katonic platform provides a one-stop solution to all the data scientists' problems. It comes with integrated tools that are very popular and most frequently used for Data Science Life Cycle. Since everything runs on the cloud so you don't have to worry about your system spaces being utilized by such heavy tools.

This tutorial will guide you to use the R-Studio on the platform for writing R-scripts.

1.1 Sign In

Once the admin creates your ID in the respective cluster, you will get your username and temporary password over e-mail.

Open the login page,set your permanent password and login to try the Katonic platform.

Untitled

Enter Email and Password and click on the “Sign In” button to sign in to the Katonic platform.

1.2 Orient yourself to the Katonic platform

When you first log in, you will find yourself in the Dashboard section of Katonic. You can use the left sidebar to navigate to other sections of Katonic Platform.

Untitled

  1. To view the platform in full screen click on the “full-screen mode“ on the top right of the page.

  2. If you would like to search the Katonic documentation for help, click on the “?” icon on the top right of the page.

  3. To send a question to a member of the Katonic support staff, use the Support button on the bottom right of the page.

1.3 Create your workspace

  1. From the Workspace on the left panel, Click on ‘Create Workspace’ in the top right side of the page.

    Untitled

  2. Fill in the following details.

    Untitled

  • Give your Workspace an informative name .

    Note : Workspace name should contain only lowercase(a-z), numbers(0-9) and hyphen(-).

  • Select Environment as R-Studio.

  • Select Image as Katonic-rstudio.

  • Select the Number of CPUs and the memory you want to allocate to Notebook then click on Create.

    Untitled

1.4 Start Workspace

  1. Once you create a workspace you could see it will be in 'Processing' state.

    Untitled

  2. Once the Workspace has started it will show the connect button with which you can connect to the R-Studio.

    Untitled

  3. When you connect, a new session is created on a machine and your browser is automatically redirected to the R-Studio UI.

  4. Once your Workspace is up and running, you will see a fresh interface.

    Untitled

  5. Click on the "+" icon from the top left of the page.

    Untitled

  6. Select the R Script option to open a blank R script page.

    Untitled

  7. You can write your R code into the R script created in the step 6.

    Untitled

  8. You can run your script using different options.

    • To run one line at a time using the option Run Selected Line.

    • To run the particular section or complete code,use the option Run Region.

      Untitled

  9. Once you run your code you will be able to see your results in different sections.

    • Console - here you will be able to see the results of your print statements.

    • Environment - here you will be able to see the information regarding the variables used in the code.

    • Plots - here you will be able to see your defined plots.

      Untitled

    Note: All the development work can be performed here. Single script could be broken down into multiple smaller scripts each defining a specific task, where in the result of one script can be saved in the file so that it can be used by further downstream scripts.

    Once these scripts are ready we can download them and upload to Katonic Studio Workspace if you want to convert these scripts to pipeline.

    It is good practice to upload your scripts to GitHub for maintaining control over it's versions.

    Click Here and follow the steps to configure GitHub in R-Studio.

    Follow the instructions of the documentation to convert your scripts into pipeline.