patch_data: patch data

View source: R/patch-data.R

patch_dataR Documentation

patch data

Description

Patch data with a diff generated by diff_data

Usage

patch_data(data, patch)

Arguments

data

data.frame that should be patched

patch

generated with diff_data

Value

data.frame that has been patched.

Examples

library(daff)
x <- iris
#change a value
x[1,1] <- 1000

patch <- diff_data(iris, x)
print(patch)
# apply patch
iris_patched <- patch_data(iris, patch)

iris_patched[1,1] == 1000

daff documentation built on June 22, 2024, 12:26 p.m.