▼ Show 1 Answer

0 votes

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.

Learn More with Madanswer

Related questions

0 votes
asked Nov 6, 2019 in R Language by MBarbieri