OR

Logical operators in R

December 14, 2010 | csgillespie

In R, the operators “|” and “&” indicate the logical operations OR and AND. For example, to test if x equals 1 and y equals 2 we do the following: __ x = 1; y = 2 __ (x == 1) & (y == 2) [1] TRUE However, if you are used to programming in [...] [Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)