%unf% | R Documentation |
Function to compare the size, structure, arrangement, and UNFs of two objects.
x %unf% y unf_equal(x, y, ...)
x |
A vector, matrix, dataframe, list, or object of class “UNF”, or a one-element character vector containing a UNF signature. |
y |
A vector, matrix, dataframe, list, or object of class “UNF”, or a one-element character vector containing a UNF signature. |
... |
Additional arguments passed to |
Compares two objects using all.equal
and additional details based on the UNF of the two objects (and, for lists, dataframes, and matrices) the constituent vectors thereof. The print method for class UNFtest
prints the UNFs for both objects and summarizes any differences between the objects. This is helpful for identifying mismatching variables.
An object of class UNFtest
containing the results of unf
for both objects and both identical
and all.equal
for the comparison of the two.
Thomas J. Leeper
unf
a <- data.frame(x1=1:10, x2=11:20) b <- data.frame(x1=1:10, x2=11:20+.0005) a %unf% a a %unf% b unf_equal(a, b, digits = 3) unf(a) %unf% "UNF6:aKW4lAFNBH8vfrnrDbQZjg=="
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.