data(DoignonFalmagne7)
K <- DoignonFalmagne7$K
as.pattern(K, freq = TRUE)
as.pattern(K)
as.pattern(K, useNames = TRUE)
as.pattern(K, as.set = TRUE)
N.R <- DoignonFalmagne7$N.R
dim(as.binmat(N.R))
dim(as.binmat(N.R, uniq = FALSE))
## Knowledge structure as binary matrix
as.binmat(c("000", "100", "101", "111"))
as.binmat(set(set(), set("a"), set("a", "c"), set("a", "b", "c")))
as.binmat(c("000", "100", "101", "111"), as.logical = TRUE)
## Subset relation incidence matrix
is.subset(K)
## Plotting the knowledge structure
if(requireNamespace("relations") &&
requireNamespace("Rgraphviz")) {
rownames(K) <- as.pattern(K, useNames = TRUE)
plot(relations::as.relation(is.subset(K)), main = "")
}
Run the code above in your browser using DataLab