0 votes
in R Language by
recategorized by
R Arithmetic Operators

1 Answer

0 votes
by

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

Operator

Description

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

Example 1:

# An addition
3 + 4

Output:

## [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.

Related questions

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