Comparison Operators
Comparison operators: ==, !=, <, >, <=, >=
1==1## [1] TRUELogical operators: AND: &, OR: |, NOT: !
x <- 1:10; y <- 10:1
x > y & x > 5## [1] FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE TRUE TRUEBasic Calculations
To look up math functions, see Function Index here
x + y## [1] 11 11 11 11 11 11 11 11 11 11sum(x)## [1] 55mean(x)## [1] 5.5apply(iris[1:6,1:3], 1, mean) ## 1 2 3 4 5 6
## 3.333333 3.100000 3.066667 3.066667 3.333333 3.666667