What You May Take for Granted: The Difference Between & and && in R

Lathan Liou
3 min readSep 8, 2020
After reading the article, which one do you think represents a “&” and a “&&”?

If you’ve been using R for a while now, you may have come across the double “&” operator. Most people who’ve coded before, whether in R or some other language, have an intuitive feel for what the “&” represents. It’s a logical AND statement. “The sky is blue AND cows can fly” is a logically false statement because even though the sky is blue, the second part of the statement…

--

--

Lathan Liou

Data Scientist at Merck. Tidyverse enthusiast and a neRd.