Compute a patch between two same-name same-length lists.
ANY. The "before" object.
ANY. The "new" object. These are usually a data.frame or an environment.
patch translating the
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.