View source: R/misc_functions.R
identical_elements | R Documentation |
This function checks whether all elements in a numeric vector are equal within a specified tolerance. It returns TRUE if all elements are identical (considering the tolerance), and FALSE otherwise.
identical_elements(x, tol = .Machine$double.eps^0.5)
x |
A numeric vector to test. |
tol |
A numeric tolerance used for the comparison (default: .Machine$double.eps^0.5). |
A logical value indicating whether all elements in x
are identical.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.