ConceptSet | R Documentation |
This class implements the data structure and methods for concept sets.
new()
Create a new ConceptLattice
object.
ConceptSet$new(extents, intents, objects, attributes, I = NULL)
extents
(dgCMatrix
) The extents of all concepts
intents
(dgCMatrix
) The intents of all concepts
objects
(character vector) Names of the objects in the formal context
attributes
(character vector) Names of the attributes in the formal context
I
(dgCMatrix
) The matrix of the formal context
A new ConceptLattice
object.
size()
Size of the Lattice
ConceptSet$size()
The number of concepts in the lattice.
is_empty()
Is the lattice empty?
ConceptSet$is_empty()
TRUE
if the lattice has no concepts.
extents()
Concept Extents
ConceptSet$extents()
The extents of all concepts, as a dgCMatrix
.
intents()
Concept Intents
ConceptSet$intents()
The intents of all concepts, as a dgCMatrix
.
print()
Print the Concept Set
ConceptSet$print()
Nothing, just prints the concepts
to_latex()
Write in LaTeX
ConceptSet$to_latex(print = TRUE, ncols = 1, numbered = TRUE, align = TRUE)
print
(logical) Print to output?
ncols
(integer) Number of columns of the output.
numbered
(logical) Number the concepts?
align
(logical) Align objects and attributes independently?
The LaTeX
code to list all concepts.
to_list()
Returns a list with all the concepts
ConceptSet$to_list()
A list of concepts.
[()
Subsets a ConceptSet
ConceptSet$[(indices)
indices
(numeric or logical vector) The indices of the concepts to return as a list of Concepts. It can be a vector of logicals where TRUE
elements are to be retained.
Another ConceptSet.
sub()
Individual Concepts
ConceptSet$sub(index)
index
(numeric) The index of the concept to return.
The Concept.
support()
Get support of each concept
ConceptSet$support()
A vector with the support of each concept.
clone()
The objects of this class are cloneable with this method.
ConceptSet$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Build a formal context
fc_planets <- FormalContext$new(planets)
# Find the concepts
fc_planets$find_concepts()
# Find join- and meet- irreducible elements
fc_planets$concepts$join_irreducibles()
fc_planets$concepts$meet_irreducibles()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.