R Operators
Arithmetic: + - * / ^ %% %/%. Comparison: == != < >. Assignment: <- and ->. %in% tests membership. Operators work on whole vectors at once.
Example
x <- c(1, 2, 3)
print(x * 2); print(x + x); print(3 %in% x)Exercise
Membership test.
3 x
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.