homogeneous_list_patch: Compute a patch between two same-name same-length lists.

Description Usage Arguments Value Note

Description

Compute a patch between two same-name same-length lists.

Usage

1
homogeneous_list_patch(old_object, new_object)

Arguments

old_object

ANY. The "before" object.

new_object

ANY. The "new" object. These are usually a data.frame or an environment.

Value

a patch translating the old_object to the new_object.

Note

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.


robertzk/objectdiff documentation built on May 27, 2019, 10:35 a.m.