Skip to content

Instantly share code, notes, and snippets.

@fronx
Created January 16, 2013 12:44
Show Gist options
  • Select an option

  • Save fronx/4546888 to your computer and use it in GitHub Desktop.

Select an option

Save fronx/4546888 to your computer and use it in GitHub Desktop.
c(1,2,3,4,5,6,7)[1:1 + 4 -1]
# => [1] 4
c(1,2,3,4,5,6,7)[1:(1 + 4 -1)]
# => [1] 1 2 3 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment