
Last chance! 50% off unlimited learning
Sale ends in
Adds new relations to existing or new sets and elements. If the sets or elements do not exist they are added.
add_relations(object, elements, sets, fuzzy, ...)
A TidySet
object with the new relations.
A TidySet
object
A character vector of the elements.
A character vector of sets to be added.
The strength of the membership.
Placeholder for other arguments that could be passed to the method. Currently not used.
add_relation()
to add relations with new sets or/and
new elements.
Other add_*:
add_elements()
,
add_sets()
x <- list("a" = letters[1:5], "b" = LETTERS[3:7])
a <- tidySet(x)
add_relations(a, elements = c("a", "b", "g"), sets = "d")
add_relations(a, elements = c("a", "b"), sets = c("d", "g"))
add_relations(a, elements = c("a", "b"), sets = c("d", "g"), fuzzy = 0.5)
add_relations(a,
elements = c("a", "b"), sets = c("d", "g"),
fuzzy = c(0.5, 0.7)
)
Run the code above in your browser using DataLab