Skip to content
Prev 244058 / 398506 Next

How can I refer to actual (n) and previous (n-1) elements in a vector?

Sorry for the noise.  That should have been

v[-length(v)] + v[-1]


Hope this is more helpful,

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA 98504-5204