Description Usage Arguments Value Note
Compute a patch between two same-name same-length lists.
1 | homogeneous_list_patch(old_object, new_object)
|
old_object |
ANY. The "before" object. |
new_object |
ANY. The "new" object. These are usually a data.frame or an environment. |
a patch
translating the old_object
to
the new_object
.
Taking the diff of two lists requires good performance on the following two competing scenarios: 1. Long lists with small elements 2. Short lists with large elements We will call the former long lists and the latter wide lists.
In practice, we will not have to deal with incredibly nested lists, and R places stack overflow limits on these in any case. We make use of this fact by performing a stochastic estimation to determine whether the list is short or wide.
In particular, we sample up to 5 determine their size with the sample sampling strategy using utils::object.size.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.