How do you do simple arithmetic in R?

You can do simple arithmetic in R by using the basic arithmetic operators such as + (addition), - (subtraction), * (multiplication), and / (division). For example, to add two numbers together, you would type:

x <- 5
y <- 10

z <- x + y

print(z)

The output would be 15.