R Tutorial

Fundamentals of R

Variables

Input and Output

Decision Making

Control Flow

Functions

Strings

Vectors

Lists

Arrays

Matrices

Factors

DataFrames

Object Oriented Programming

Error Handling

File Handling

Packages in R

Data Interfaces

Data Visualization

Statistics

Machine Learning with R

How to Install R Studio on Windows and Linux?

Installing RStudio is a straightforward process, but before you install RStudio, ensure that you have R itself installed on your system. Here's a step-by-step guide to installing R and RStudio on both Windows and Linux:

Windows:

1. Install R:

  1. Go to CRAN R-project website.
  2. Click on "Download R for Windows".
  3. Click on "base".
  4. Download the latest R version by clicking on the link at the top of the page.
  5. Run the .exe file and follow the installation instructions.

2. Install RStudio:

  1. Visit the RStudio download page.
  2. Under "Installers for Supported Platforms", click on "Windows 10/8/7" to download the installer.
  3. Run the .exe file and follow the installation instructions.

Linux:

For Linux, the steps may vary slightly depending on the distribution you are using. Here's a general approach using Ubuntu/Debian as an example:

1. Install R:

  1. Open the terminal.

  2. Add the CRAN repository to get the latest version of R:

    sudo echo "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/" | sudo tee -a /etc/apt/sources.list
    
  3. Add the R signing key:

    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
    
  4. Update the system:

    sudo apt update
    
  5. Install R:

    sudo apt install r-base
    

2. Install RStudio:

  1. Visit the RStudio download page.

  2. Under "Installers for Supported Platforms", find the version suitable for your Linux distribution (e.g., Debian/Ubuntu).

  3. Download the .deb file.

  4. Install the .deb file. Navigate to the download directory and use:

    sudo apt install ./rstudio-x.yy.zzz-amd64.deb  # replace x.yy.zzz with the actual version number
    

    Alternatively, you can use a GUI package installer like GDebi to install the .deb file.

Once installed, you can launch RStudio from your applications menu or terminal. Make sure to regularly check for updates to both R and RStudio to benefit from new features and bug fixes.