Nov 4, 2019 in R Language
Q: R Arithmetic Operators

1 Answer

0 votes
Nov 4, 2019

We will first see the basic arithmetic operations in R. The following operators stand for:



+ Addition
- Subtraction
* Multiplication
/ Division
^ or ** Exponentiation

Example 1:

# An addition
3 + 4


## [1] 7

You can easily copy and paste the above R code into Rstudio Console. The output is displayed after the character #. For instance, we write the code print('Guru99') the output will be ##[1] Guru99.

The ## means we print an output and the number in the square bracket ([1]) is the number of the display

The sentences starting with # annotation. We can use # inside an R script to add any comment we want. R won't read it during the running time.

Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

0 votes
Nov 6, 2019 in R Language