With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

Performing data operations

The following are the different data operations available in R:

• Arithmetic operations
• String operations
• Aggregation operations

Arithmetic operations on the data

In this dataset, we will see the arithmetic operations performed on the data. We can perform various operations such as addition, subtraction, multiplication, division, exponentiation, and modulus. Let's see how these operations are performed in R. Let's first declare two numeric vectors:

```a1 <- c(1,2,3,4,5)
b1 <- c(6,7,8,9,10)
c1 <- a1+b1
  7  9 11 13 15
c1 <- b1-a1
 5 5 5 5 5
c1 <- b1*a1
  6 14 24 36 50
c1 <- b1/a1
 6.000000 3.500000 2.666667 2.250000 2.000000
```

Apart from those seen at the top, the other arithmetic operations are the exponentiation and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required