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

set_size

Calculates the size of a set


Description

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

Usage

set_size(object, sets = NULL)

## S4 method for signature 'TidySet'
set_size(object, sets = NULL)

Arguments

object

A TidySet object.

sets

The sets from which the length is calculated.

Value

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

Methods (by class)

See Also

cardinality

Other sizes: element_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)
set_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.