PROGRAMMING IN R Introduction to R. In this session I will: Introduce you to the R program and...
-
Upload
harriet-allison -
Category
Documents
-
view
220 -
download
0
description
Transcript of PROGRAMMING IN R Introduction to R. In this session I will: Introduce you to the R program and...
![Page 1: 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.](https://reader036.fdocuments.in/reader036/viewer/2022082415/5a4d1b247f8b9ab059996898/html5/thumbnails/1.jpg)
PROGRAMMING IN R
Introduction to R
![Page 2: 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.](https://reader036.fdocuments.in/reader036/viewer/2022082415/5a4d1b247f8b9ab059996898/html5/thumbnails/2.jpg)
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
![Page 3: 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.](https://reader036.fdocuments.in/reader036/viewer/2022082415/5a4d1b247f8b9ab059996898/html5/thumbnails/3.jpg)
Introduction to R• R is available at the following
website:http://www.r-project.org/
• You can download R by clicking on the “Down Load” link.
• We will demonstrate this later in this video.
![Page 4: 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.](https://reader036.fdocuments.in/reader036/viewer/2022082415/5a4d1b247f8b9ab059996898/html5/thumbnails/4.jpg)
Introduction to R• There is an introduction to R
available on the CRAN R-project website.
http://cran.r-project.org/doc/manuals/R-intro.pdf• I recommend downloading this
document and getting acquainted with it.
![Page 5: 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.](https://reader036.fdocuments.in/reader036/viewer/2022082415/5a4d1b247f8b9ab059996898/html5/thumbnails/5.jpg)
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
![Page 6: 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.](https://reader036.fdocuments.in/reader036/viewer/2022082415/5a4d1b247f8b9ab059996898/html5/thumbnails/6.jpg)
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.
![Page 7: 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.](https://reader036.fdocuments.in/reader036/viewer/2022082415/5a4d1b247f8b9ab059996898/html5/thumbnails/7.jpg)
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.
![Page 8: 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.](https://reader036.fdocuments.in/reader036/viewer/2022082415/5a4d1b247f8b9ab059996898/html5/thumbnails/8.jpg)
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.
![Page 9: 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.](https://reader036.fdocuments.in/reader036/viewer/2022082415/5a4d1b247f8b9ab059996898/html5/thumbnails/9.jpg)
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.
![Page 10: 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.](https://reader036.fdocuments.in/reader036/viewer/2022082415/5a4d1b247f8b9ab059996898/html5/thumbnails/10.jpg)
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.
![Page 11: 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.](https://reader036.fdocuments.in/reader036/viewer/2022082415/5a4d1b247f8b9ab059996898/html5/thumbnails/11.jpg)
R variables. • There are different types of
objects or ways to store variables.• Vectors• Lists• Functions• For now, we will only work with
Vectors.
![Page 12: 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.](https://reader036.fdocuments.in/reader036/viewer/2022082415/5a4d1b247f8b9ab059996898/html5/thumbnails/12.jpg)
Introduction to R• Let’s install R.