DSR Unit 2
DSR Unit 2
VIII SEMESTER
DS-427T
UNIT-2
Department of Computer Science and Engineering,
BVCOE New Delhi
1 Subject: Data Science Using R , Instructor: Ms 9/20/2024
Rachna Narula
How to Run R
1. Download, Install R (from the Berkely server): https://cran.cnr.berkeley.edu
2. Download, Install RStudio: https://www.rstudio.com/products/rstudio/download3/
3. Run RStudio Just the R Console appears when the R app is run by itself, that is, not
within the RStudio environment. The figure below shows what opens the first time
RStudio is run. You get the same R Console from the R app, and you get more. You are
running R either way.
⚫ Basic Math:- R is a powerful tool for all manner calculations, data manipulation
and scientific computations. R can certainly be used to do basic math.
⚫ Examples:- > 1+1
⚫ > 1+2+3
⚫ > 3*7*2
⚫ R follows the basic order of operations: Parenthesis, Exponents, Multiplication,
Division, Addition and Subtraction (PEMDAS). This means the operations
inside parenthesis take priority over other operations. Next on the priority list is
exponentiation. After that multiplication and division are performed, followed
by addition and subtraction.
⚫ Example:- > 4 * 6 + 5
⚫ > (4 * 6) + 5
⚫ > 4 * (6 + 5)