diff options
author | searoso <skaunov@gmail.com> | 2015-01-20 21:34:18 +0300 |
---|---|---|
committer | searoso <skaunov@gmail.com> | 2015-01-20 21:34:18 +0300 |
commit | 209dc039ecc5ee280e5239afe5e2a77a851f795f (patch) | |
tree | e15453b2f5361e220dde92e7469fdb211b06b5a6 /r.html.markdown | |
parent | 6915f5bfd065434a24e52bf6b9fe2007b011e6cd (diff) |
Update r.html.markdown
Added logical operators that were missing.
Diffstat (limited to 'r.html.markdown')
-rw-r--r-- | r.html.markdown | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/r.html.markdown b/r.html.markdown index c555d748..13fa2654 100644 --- a/r.html.markdown +++ b/r.html.markdown @@ -229,6 +229,13 @@ FALSE != FALSE # FALSE FALSE != TRUE # TRUE # Missing data (NA) is logical, too class(NA) # "logical" +# Use for | and & for logic operations. +# OR +TRUE | FALSE # TRUE +# AND +TRUE & FALSE # FALSE +# You can test if x is TRUE +isTRUE(TRUE) # TRUE # Here we get a logical vector with many elements: c('Z', 'o', 'r', 'r', 'o') == "Zorro" # FALSE FALSE FALSE FALSE FALSE c('Z', 'o', 'r', 'r', 'o') == "Z" # TRUE FALSE FALSE FALSE FALSE |