Skip to content
Justice Tech School

R Logicals

Logical values are TRUE and FALSE. Operators: == != < > <= >= & | !. && and || work on single values.

Example
x <- 10
print(x > 5); print(x == 10 & x < 20); print(!(x > 5))

Exercise

Logical and.

a  b

Quiz Test

What are R logical values?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.