which_conflicts: return which rows of a merged 'data.frame' contain conflicts

View source: R/merge-data.R

which_conflictsR Documentation

return which rows of a merged data.frame contain conflicts

Description

return which rows of a merged data.frame contain conflicts.

Usage

which_conflicts(merged)

Arguments

merged

data.frame merged data.frame with possible conflicts.

Value

integer vector with row positions containing conflicts.

See Also

merge_data

Examples

parent <- a <- b <- iris[1:3,]
a[1,1] <- 10
b[2,1] <- 11
# succesful merge
merge_data(parent, a, b)

parent <- a <- b <- iris[1:3,]
a[1,1] <- 10
b[1,1] <- 11
# conflicting merge (both a and b change same cell)
merged <- merge_data(parent, a, b)
merged #note the conflict

#find out which rows contain a conflict
which_conflicts(merged)

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