# Logical operator ## Definition(s) ### Nexus: [[Nexus - Google Analytics Certificate Course]] #### [[Google Analytics - 7 Data Analysis with R Programming - Module 2 - Programming using RStudio]] >[! Definition] >An operator that returns a logical data type. >These are, `AND` `&`, `OR` `|`, `NOT` `!` ## Examples The code output is in the comments following each line. ```R !TRUE # [1] FALSE TRUE & FALSE # [1] FALSE TRUE | FALSE # [1] TRUE c(TRUE, TRUE, FALSE) & c(TRUE, FALSE, FALSE) # [1] TRUE, FALSE, FALSE ``` ## Related ## Resources [Builtin (website) Logical Operators in R](https://builtin.com/data-science/and-in-r) ## Flashcards The below code are generated for use with [Spaced Repetition plugin](https://github.com/st3v3nmw/obsidian-spaced-repetition/) [docs](https://www.stephenmwangi.com/obsidian-spaced-repetition/)