OurStatsClub
  • Getting Start with R Programming
  • What is R and Why
  • R Programming
  • R for Data Science
  • R Arithmetic Operators
  • R Relational Operators
  • Logical Operators
  • Data entry in R
Powered by GitBook
On this page

Was this helpful?

R Arithmetic Operators

These operators are used to carry out mathematical operations like addition and multiplication. Here is a list of arithmetic operators available in R.

Arithmetic Operators in R

Operator

Description

+

Addition

–

Subtraction

*

Multiplication

/

Division

^

Exponent

%%

Modulus (Remainder from division)

%/%

Integer Division

Some examples are:

x = 5

y = 16

x+y

[1] 21

x-y

[1] -11

x*y

[1] 80

y/x

[1] 3.2

y%/%x

[1] 3

y%%x

[1] 1

y^x

[1] 1048576

PreviousR for Data ScienceNextR Relational Operators

Last updated 4 years ago

Was this helpful?