add_relations {BaseSet} | R Documentation |

## Add relations to a TidySet

### Description

Adds new relations to existing or new sets and elements. If the sets or elements do not exist they are added.

### Usage

```
add_relations(object, elements, sets, fuzzy, ...)
```

### Arguments

`object` |
A |

`elements` |
A character vector of the elements. |

`sets` |
A character vector of sets to be added. |

`fuzzy` |
The strength of the membership. |

`...` |
Placeholder for other arguments that could be passed to the method. Currently not used. |

### Value

A `TidySet`

object with the new relations.

### Note

`add_relations`

doesn't set up any other information about the
relationship.
Remember to add/modify them if needed with `mutate`

or `mutate_relation`

### See Also

`add_relation()`

to add relations with new sets or/and
new elements.

Other add_*:
`add_elements()`

,
`add_sets()`

### Examples

```
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)
)
```

[Package

*BaseSet*version 0.9.0 Index]