abs_diff | R Documentation |
Equivalent to abs(x - y)
but aims to be faster by
avoiding allocations.
abs_diff(x, y, nThread = getOption("hutilscpp.nThread", 1L), option = 1L)
max_abs_diff(x, y, nThread = getOption("hutilscpp.nThread", 1L))
x, y |
Atomic, numeric, equilength vectors. |
nThread |
Number of threads to use. |
option |
An integer, provides backwards-compatible method to change results.
|
x <- sample(10)
y <- sample(10)
abs_diff(x, y)
max_abs_diff(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.