Link Search Menu Expand Document

Arithmetic Operations

R has operators that correspond to the basic arithmetic we learned in primary school: addition is +, subtraction is -, multiplication is * and division ia /. As you can see, R uses fairly standard symbols to denote each of the different operations you might want to perform: if I wanted to find out what 57 times 61 is (and who wouldn’t?), I can use R instead of a calculator, like so:

There are three other arithmetic operations that I should probably mention: taking powers, doing integer division, and calculating a modulus. We will not be covering those today, but Danielle Navarro’s Learning statistics with R does and is a great resource. So check it out!

Works Cited

  1. Navarro, Danielle. Learning statistics with R.