sorry for the elementary question but I need to partition a list of numbers at an offset of 1. e.g., i have a list like:
c(194187, 193668, 192892, 192802 ..)
and need a list of lists like:
c(c(194187, 193668), c(193668, 192892), c(192892, 192802)...)
where the last element of list n is the first of list n+1. there must be a way to do this with split() but I can't figure it out in mathematica, the command i need is Partition[list,2,1]
Here is an option using
base R
to create avector
of elementsIf we need a
list
data