Reverse the result: !
On top of the &
and |
operators, you also learned about the !
operator, which negates a logical value. To refresh your memory, here are some R expressions that use !
. They all evaluate to FALSE
:
!TRUE
!(5 > 3)
!!FALSE
What would the following set of R expressions return?
x <- 5
y <- 7
!(!(x < 4) & !!!(y > 12))
This exercise is part of the course
Intermediate R
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
