Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

element_size

Calculates the size of the elements


Description

Assuming that the fuzzy values are probabilities, calculates the probability of being of different sizes for a given set.

Usage

element_size(object, elements = NULL)

## S4 method for signature 'TidySet'
element_size(object, elements = NULL)

Arguments

object

A TidySet object.

elements

The element from which the length is calculated.

Value

A list with the size of the elements or the probability of having that size.

Methods (by class)

  • TidySet: Calculates the number of sets an element appears with length_set()

See Also

cardinality

Other sizes: set_size()

Examples

relations <- data.frame(
    sets = c(rep("A", 5), "B", "C"),
    elements = c(letters[seq_len(6)], letters[6]),
    fuzzy = runif(7)
)
a <- tidySet(relations)
element_size(a)

BaseSet

Working with Sets the Tidy Way

v0.0.16
MIT + file LICENSE
Authors
Lluís Revilla Sancho [aut, cre] (<https://orcid.org/0000-0001-9747-2570>), Zebulun Arendsee [rev], Jennifer Chang [rev]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.