Skip to content

Instantly share code, notes, and snippets.

@jnhutchinson
Created June 5, 2013 15:27
Show Gist options
  • Save jnhutchinson/5714746 to your computer and use it in GitHub Desktop.
Save jnhutchinson/5714746 to your computer and use it in GitHub Desktop.
Function to see if vectors are in the exact same order
sameorder = function(x,y) {
all(diff(match(x, y))==1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment