squish_patches: Squish a sequence of patches off a base object into one.

Description Usage Arguments Value See Also Examples

Description

Squish a sequence of patches off a base object into one.

Usage

1
squish_patches(base, patches)

Arguments

base

ANY. R object to base the squishing off.

patches

list. A list of patches (functions derived from objectdiff).

Value

a single patch.

See Also

objectdiff

Examples

1
2
3
4
5
6
iris2 <- iris; iris2[1,1] <- 1
patch1 <- objectdiff(iris, iris2)
iris3 <- iris2; iris3[1,1] <- 2
patch2 <- objectdiff(iris2, iris3)
patch3 <- squish_patches(iris, list(patch1, patch2))
stopifnot(identical(iris3, patch3(iris)))

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