Applies the diff function but pads it with
NAs to retain original length.
filldiff(x, gap = 1)
a vector of any type
the gap to be passed to
When the gap is an odd number the extra
NA goes at the start.
A difference vector with
NAs introduced to make it up to the same size as the input
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.