PROGRAMMING IN R Introduction to R
In this session I will: Introduce you to the R program and windows Show how to install R Write basic programs in R
Introduction to R R is available at the following website: You can download R by clicking on the “Down Load” link. We will demonstrate this later in this video.
Introduction to R There is an introduction to R available on the CRAN R-project website. project.org/doc/manuals/R-intro.pdf I recommend downloading this document and getting acquainted with it.
Introduction to R R is an environment for statistical computing, data analysis, and graphics We will use R for describing and analyzing data Being proficient in using R for statistical computing and analysis a skill that is highly valued in multiple arenas
R Environment R is an extremely capable environment. The differences between R and SAS are too enumerable to describe. R is similar to the S language developed at Bell Laboratories. R can be challenging to learn but practice will make it easier.
R Environment There are three basic components to the R environment or R console. R Commands window or Prompt– executes the commands. Script Window – a program editor provided by R. Graphics Window – an output window that displays graphics.
R Environment R is an expression language It is case sensitive –A and a are two different symbols –Refer to different variables. Elementary commands consist of either expressions or assignments.
R Environment Expressions –Given as a command, is evaluated, printed, and the value is lost. Assignments –Evaluates the expression and passes the value to a variable –The result is not printed.
R Environment The R environment also has many different ways to store data. R is an object oriented language so everything is stored as an object. In this session, we will define the various types of objects but we will only use 2 of these types.
R variables. There are different types of objects or ways to store variables. Vectors Lists Functions For now, we will only work with Vectors.
Introduction to R Let’s install R.