Skip to content

Instantly share code, notes, and snippets.

@VictorOmondi1997
Last active May 7, 2020 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VictorOmondi1997/fb9b1910702c24bf0ca33cb85457c267 to your computer and use it in GitHub Desktop.
Save VictorOmondi1997/fb9b1910702c24bf0ca33cb85457c267 to your computer and use it in GitHub Desktop.
R arithmetic operators
Arithmetic Operator Function Description Example Output
+ Addition adds a number to another number 3+2 [1] 5
- Subtraction subtracts a number from another number 3 - 2 [1] 1
* Multiplication multiplies number with another number 3 * 2 [1] 6
/ Division splits a number into equal parts 3/2 [1] 1.5
^ Exponentiation raising a number to the power of another number 3 ** 2 [1] 9
%% Modulo returns the remainder of the division 3 %% 2 [1] 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment