Читать книгу The Big R-Book - Philippe J. S. De Brouwer - Страница 119
4.4.2 Relational Operators
ОглавлениеRelational Operators compare vectors element by element
relational operators
operator – relational
v1 <- c(8,6,3,2) v2 <- c(1,2,3,5) v1 > v2 # bigger than ## [1] TRUE TRUE FALSE FALSE v1 < v2 # smaller than ## [1] FALSE FALSE FALSE TRUE v1 <= v2 # smaller or equal ## [1] FALSE FALSE TRUE TRUE v1 >= v2 # bigger or equal ## [1] TRUE TRUE TRUE FALSE v1 == v2 # equal ## [1] FALSE FALSE TRUE FALSE v1 != v2 # not equal ## [1] TRUE TRUE FALSE TRUE
bigger than
smaller than
bigger or equal
equal
not equal