Description Usage Arguments Examples

S3 method for `quantities`

objects (see `diff`

).

1 2 |

`x` |
a numeric vector or matrix containing the values to be differenced. |

`lag` |
an integer indicating which lag to use. |

`differences` |
an integer indicating the order of the difference. |

`...` |
further arguments to be passed to or from methods. |

1 2 3 4 5 | ```
diff(set_quantities(1:10, m/s, 0.1), 2)
diff(set_quantities(1:10, m/s, 0.1), 2, 2)
x <- cumsum(cumsum(set_quantities(1:10, m/s, 0.1)))
diff(x, lag = 2)
diff(x, differences = 2)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.