rs <- relation_schema(
list(
a = list(c("a", "b"), list("a")),
b = list(c("b", "c"), list("b")),
b.1 = list(c("b", "d"), list("b")),
d = list(c("d", "e"), list("d", "e"))
),
letters[1:5]
)
ds <- database_schema(
rs,
list(
list("a", "b", "b", "b"),
list("b.1", "d", "d", "d")
)
)
merge_schemas(rs, 3, 2) # merging b and b.1
merge_schemas(ds, 3, 2) # also merging their references
# merging a schema into itself just removes it
merge_schemas(rs, 3, 3)
merge_schemas(ds, 3, 3)
Run the code above in your browser using DataLab