Description Usage Arguments Details Author(s) Examples
Miscellaneous set operations.
1 2 3 4 5 | is.subsetof(x, set)
is.insetlist(x, setlist, index=FALSE)
removeRedundant(setlist, maximal = TRUE, index = FALSE)
maximalSets(setlist, index = FALSE)
minimalSets(setlist, index = FALSE)
|
x, set |
Vectors representing sets |
setlist |
List of vectors (representing a set of subsets) |
maximal |
Logical; see section 'Details' for a description. |
index |
Logical; should indices (in setlist) be returned or a set of subsets. |
'setlist' is a list of vectors representing a set of subsets; i.e. V1,...VQ where Vk is a subset of some base set V.
is.insetlist
: Checks if the set x is in one of the Vk's.
removeRedundant
: Returns those Vk which are not contained in other
subsets; i.e. gives the maximal sets. If maximal is FALSE then returns
the minimal sets; i.e. Vk is returned if Vk is contained in one of the
other sets Vl and there are no set Vn contained in Vk.
Notice that the comparisons are made by turning the elements into characters and then comparing these. Hence 1 is identical to "1".
S<f8>ren H<f8>jsgaard, sorenh@math.aau.dk
1 2 3 4 5 6 7 8 9 10 11 12 13 | is.subsetof(c(1,2),c(1,2,3))
is.subsetof(c(1,2,3), c(1,2))
l <- list(c(1,2),c(1,2,3),c(2,4),c(5,6), 5)
#subsetofList(c(1,2), l)
#subsetofList(c(1,2,3,4), l)
removeRedundant(l)
removeRedundant(l, maximal=FALSE)
is.insetlist (c(2,4), l)
is.insetlist (c(2,8), l)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.