ropensci / BaseSet

Provides classes for working with sets
https://docs.ropensci.org/BaseSet
Other
10 stars 3 forks source link

filtering and then element_size selecting an element #43

Closed llrs closed 4 years ago

llrs commented 4 years ago
set.seed(4567)
relations <- data.frame(sets = c(rep("A", 5), "B", "C"),
                          elements = c(letters[seq_len(6)], letters[6]),
                          fuzzy = runif(7))
fuzzy_set <- tidySet(relations)
element_size(fuzzy_set, "f")
fuzzy_set %>% filter(sets %in% c("B", "C")) %>% element_size(element = "f")

Last two lines the content should be the same but it isn't on R 3.6.3 (everything is filled with NA). Solve this and add a test.