R and R Studio Programming for Statistics, R Tutorials and Examples

R is a programming language and suitable background for statistical computing works and graphics. R is the most usable statistical programming language because of various reasons. R is a free and open-source software project, which has the freedom to,

  • Run the software for any process.
  • Study how the program in the software work
  • Redistribute copies (or even sell)
  • Improve the software

R system has two conceptual parts; the Base R system that can be downloaded from the CRAN (The Comprehensive R Archive Network) and everything else. The Base R system contains the base package which is required to run R and most basic functions.




Installing R

Go to the CRAN (Comprehensive R Archive Network) web site which can be accessed through https://cran.r-project.org/ to install the latest version of R. You are advised to visit CRAN website regularly for updates.




R Environment

When R is running, functions, data, results are stored in the memory in a form of objects which have a name.

R Workspace

Contains all functions, data, results by you are working with and package loaded

Packages

The package is a fundamental units of reproducible R code in R program. They include reusable R functions, the documentations that describe how to use them, and sample data. "Base" package contains most of the fundamental functions of R

Library

The place (directory) where packages are stored is called the library.




R Studio

R studio is an integrated development environment (IDE) that allows you to interact With R more readily. R studio is most similar to the standard RGui ,but is considerably more flexible. R studio has more drop-down menus, windows with multiple tabs, and many customization options to do our statistical works.

  • Console Window : location where commands are entered, and the output is printed
  • Source Tabs : built in text editor
  • Environment Tab : interactive list of loaded R objects
  • History Tab : list of keystrokes entered into the Console
  • Files Tab : file explore to navigate folders
  • Plots Tab : output locations for plots
  • Package Tab : Output location for help commands and help search window
  • Viewer Tab : advanced tab for local content
R Studio background

Example programs for R programing in R Studio

In these example programs, you can find relevant questions, tables made for collected data and R codes.