compare_vecs | R Documentation |
Returns a table summarising the ordering of corresponding elements of the two supplied vectors. Inputs can be factors but must be atomic and the same length. If the vectors are of different classes or types then the comparison will depend on coercion.
compare_vecs(x, y, names = NULL, simple = FALSE, tol = 0.000001, na.rm = FALSE)
x, y |
The two vectors to be compared. Both vectors must be atomic and of the same length. |
names |
Optional length 2 string vector of names for the input vectors, to be used in the output table. Otherwise, "x" and "y" are used. |
simple |
Logical. If TRUE then only checks for pairwise differences, not ordering. |
tol |
When comparing numeric vectors, equality and inequality comparisons use this tolerance. |
na.rm |
If |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.