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 Relational Operators

Relational operators are used to comparing values. Here is a list of relational operators available in R.

Relational Operators in R

Operator

Description

\<

Less than

\>

Greater than

\<=

Less than or equal to

\>=

Greater than or equal to

==

Equal to

!=

Not equal to

Some examples are:

x = 5

y = 16

x\<y

[1] TRUE

x\>y

[1] FALSE

x\<=5

[1] TRUE

y\>=20

[1] FALSE

y == 16

[1] TRUE

x != 5

[1] FALSE

PreviousR Arithmetic OperatorsNextLogical Operators

Last updated 4 years ago

Was this helpful?