blog posts

Teaching local environment settings in R programming

In this article, you’ll learn about the environment (global environment, cascading of environments and so on) in R programming. You will also learn about scope of variables with the help of examples.

Install Windows

R programming, You can download the Windows R installer from R-3.2.2 for Windows (64/32) and save it to a local directory.

Since this is a Windows (.exe) installer called “R-version-win.exe”; You can run the installer by double-clicking and accepting the default settings. If your Windows is a 32-bit version, the 32-bit version will run. But if your Windows is 64-bit; Then both 32-bit and 64-bit versions will be installed on your device.

After installation; You can place the icon to run the program in a directory structure “R / R3.2.2 \ bin \ i386 \ Rgui.exe” under the Windows program files. Click on this icon; R-GUI comes up, which is the R console for R programming.

Install Linux

R is available in binary for most versions of Linux in the R Binaries  position.

The installation structure of Linux varies from one type to another. These steps are below any Linux version mentioned in the link; mentioned. However, if you are in a hurry, you can use the yum command below to install R.

$ yum install R

Top command, the main function of R programming along with standard packages; Installs; While you still need extra packages; You can then launch R as follows:

$ R

R version 3.2.0 (2015-04-16) – “Full of Ingredients”

Copyright (C) 2015 The R Foundation for Statistical Computing

Platform: x86_64-redhat-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.

You are welcome to redistribute it under certain conditions.

Type ‘license ()’ or ‘license ()’ for distribution details.

R is a collaborative project with many contributors.

Type ‘contributors ()’ for more information and

‘citation ()’ on how to cite R or R packages in publications.

Type ‘demo ()’ for some demos, ‘help ()’ for on-line help, or

‘help.start ()’ for an HTML browser interface to help.

Type ‘q ()’ to quit R.

>

You can now use the installation command in R to install the package you need. for example; The command below will install the plotrix package , which is required for 3D charts.

> install.packages (“plotrix”)