Editing Mika/Notes/Computer Stuff/R
From WikiDotMako
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 5: | Line 5: | ||
# Find similarities between two lists: | # Find similarities between two lists: | ||
intersect(x,y) | |||
# Find difference between two lists: | # Find difference between two lists: | ||
outersect <- function(x, y) { | |||
sort(c(setdiff(x, y), | sort(c(setdiff(x, y), | ||
setdiff(y, x))) | setdiff(y, x))) |