Created
August 18, 2015 01:39
-
-
Save iracooke/20f701e33bc0adf1dc39 to your computer and use it in GitHub Desktop.
R Cheat Sheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setA = c("A","B","C","D") | |
| setB = c("A","B","E","F") | |
| # Everything in both sets | |
| union(setA,setB) | |
| # Only items present in setB | |
| setdiff(setB,setA) | |
| # Only items present in setA | |
| setdiff(setA,setB) | |
| # Items present in both sets | |
| intersect(setA,setB) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment