diff --git a/R/plot_context.R b/R/plot_context.R index 3c2b6af..d35e2c6 100644 --- a/R/plot_context.R +++ b/R/plot_context.R @@ -92,11 +92,11 @@ plot_context <- function(I, to_latex, ...) { # Heatmap p <- I |> - Matrix::as.matrix() |> + Matrix::as.matrix() |> t() |> # Data wrangling as.data.frame() |> tibble::rownames_to_column(var = "object") |> - tidyr::pivot_longer(cols = colnames(I)) |> + tidyr::pivot_longer(cols = rownames(I)) |> dplyr::mutate(text = glue::glue( "{object}, {name} is {value}" )) |> @@ -115,9 +115,10 @@ plot_context <- function(I, to_latex, ...) { ggplot2::ylab("") + ggplot2::theme(legend.position = "none") + ggplot2::scale_y_discrete( - limits = rev + limits = rev(colnames(I)) ) + ggplot2::scale_x_discrete( + limits = rownames(I), position = "top" ) diff --git a/cran-comments.md b/cran-comments.md index b575585..60045e4 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,13 +1,12 @@ ## Test environments * local R installation, on MACOS BigSur 11.4, R version 4.3.0 (2023-04-21), platform: aarch64-apple-darwin20 (64-bit) * win-builder (devel) -* windows-latest (release), ubuntu-20.04 (release) via GitHub actions. +* macos-latest (release), windows-latest (release), ubuntu-20.04 (release) via GitHub actions. * Ubuntu Linux 20.04.1 LTS, R-release, GCC on R-hub. -* local R with valgrind using docker * Default platforms using devtools::check_rhub(). ## Comments -New version with some improvements. +New version with some improvements and several fixes for changes in other dependencies. ## R CMD check results There were no ERRORs, WARNINGs or NOTEs. diff --git a/doc/concept_lattice.html b/doc/concept_lattice.html index 430068c..37fff2d 100644 --- a/doc/concept_lattice.html +++ b/doc/concept_lattice.html @@ -834,9 +834,9 @@

Plotting, printing and latex-ing the FormalContext

#> O5 0 0 1 0.5 0 0 #> O6 0.5 0.5 0 0 0 1
fc_planets$plot()
-

+

fc_I$plot()
-

+

Also, we can export the formal context as a LaTeX table:

fc_planets$to_latex()
 #> \begin{table} \caption{}\label{} \centering \begin{tabular}{r|ccccccc}
diff --git a/doc/implications.html b/doc/implications.html
index b20ad26..64a6aca 100644
--- a/doc/implications.html
+++ b/doc/implications.html
@@ -975,9 +975,9 @@ 

Simplification Logic

fc_I$implications$apply_rules(rules = c("composition",
                                         "simplification"))
 #> Processing batch
-#> --> Composition: from 12 to 12 in 0.001 secs.
-#> --> Simplification: from 12 to 12 in 0.03 secs.
-#> Batch took 0.031 secs.
+#> --> Composition: from 12 to 12 in 0 secs. +#> --> Simplification: from 12 to 12 in 0.029 secs. +#> Batch took 0.029 secs.

This enables the reduction of the cardinality and/or the size of the ImplicationSet.

In addition, the “simplification” rule to remove redundancies can be @@ -1011,8 +1011,8 @@

Entailment and equivalence of implications

# where we have removed redundancies imps2$apply_rules(c("simp", "rsimp")) #> Processing batch -#> --> Simplification: from 10 to 10 in 0.006 secs. -#> --> Right Simplification: from 10 to 10 in 0.023 secs. +#> --> Simplification: from 10 to 10 in 0.005 secs. +#> --> Right Simplification: from 10 to 10 in 0.024 secs. #> Batch took 0.029 secs. # Any implication in imps2 follows from imps imps %entails% imps2 diff --git a/docs/articles/concept_lattice_files/figure-html/unnamed-chunk-7-1.png b/docs/articles/concept_lattice_files/figure-html/unnamed-chunk-7-1.png index df02aa9..69f04e0 100644 Binary files a/docs/articles/concept_lattice_files/figure-html/unnamed-chunk-7-1.png and b/docs/articles/concept_lattice_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/docs/articles/concept_lattice_files/figure-html/unnamed-chunk-7-2.png b/docs/articles/concept_lattice_files/figure-html/unnamed-chunk-7-2.png index 40481bc..ce6a220 100644 Binary files a/docs/articles/concept_lattice_files/figure-html/unnamed-chunk-7-2.png and b/docs/articles/concept_lattice_files/figure-html/unnamed-chunk-7-2.png differ diff --git a/docs/articles/extending_equivalence.html b/docs/articles/extending_equivalence.html index ec23a5f..c01451d 100644 --- a/docs/articles/extending_equivalence.html +++ b/docs/articles/extending_equivalence.html @@ -241,21 +241,21 @@

An Examplefc$implications$apply_rules("randomize") #> Processing batch #> --> Randomize: from 10 to 10 in 0 secs. -#> Batch took 0.002 secs. +#> Batch took 0.001 secs.
 # Reordered implications
 fc$implications
 #> Implication set with 10 implications.
-#> Rule 1: {small, near, far, moon} -> {medium, large, no_moon}
-#> Rule 2: {medium, large, far, moon} -> {small, near, no_moon}
-#> Rule 3: {small, near, moon, no_moon} -> {medium, large, far}
-#> Rule 4: {large} -> {far, moon}
+#> Rule 1: {medium, large, far, moon} -> {small, near, no_moon}
+#> Rule 2: {medium} -> {far, moon}
+#> Rule 3: {small, large, far, moon} -> {medium, near, no_moon}
+#> Rule 4: {near} -> {small}
 #> Rule 5: {no_moon} -> {small, near}
-#> Rule 6: {small, medium, far, moon} -> {large, near, no_moon}
-#> Rule 7: {small, large, far, moon} -> {medium, near, no_moon}
-#> Rule 8: {far} -> {moon}
-#> Rule 9: {medium} -> {far, moon}
-#> Rule 10: {near} -> {small}
+#> Rule 6: {large} -> {far, moon} +#> Rule 7: {small, medium, far, moon} -> {large, near, no_moon} +#> Rule 8: {small, near, far, moon} -> {medium, large, no_moon} +#> Rule 9: {far} -> {moon} +#> Rule 10: {small, near, moon, no_moon} -> {medium, large, far} diff --git a/docs/articles/implications.html b/docs/articles/implications.html index 2cf9dc2..14f8235 100644 --- a/docs/articles/implications.html +++ b/docs/articles/implications.html @@ -758,8 +758,8 @@

Simplification Logicfc_I$implications$apply_rules(rules = c("composition", "simplification")) #> Processing batch -#> --> Composition: from 12 to 12 in 0.001 secs. -#> --> Simplification: from 12 to 12 in 0.021 secs. +#> --> Composition: from 12 to 12 in 0.002 secs. +#> --> Simplification: from 12 to 12 in 0.02 secs. #> Batch took 0.023 secs.

This enables the reduction of the cardinality and/or the size of the ImplicationSet.

@@ -797,9 +797,9 @@

Entailment and equivalence o # where we have removed redundancies imps2$apply_rules(c("simp", "rsimp")) #> Processing batch -#> --> Simplification: from 10 to 10 in 0.006 secs. -#> --> Right Simplification: from 10 to 10 in 0.029 secs. -#> Batch took 0.036 secs. +#> --> Simplification: from 10 to 10 in 0.005 secs. +#> --> Right Simplification: from 10 to 10 in 0.024 secs. +#> Batch took 0.029 secs. # Any implication in imps2 follows from imps imps %entails% imps2 #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 4f4f9ab..114c857 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -7,5 +7,5 @@ articles: conceptual-scaling: conceptual-scaling.html extending_equivalence: extending_equivalence.html implications: implications.html -last_built: 2023-11-30T10:06Z +last_built: 2023-11-30T10:40Z diff --git a/docs/reference/ImplicationSet.html b/docs/reference/ImplicationSet.html index 5057119..f673dd2 100644 --- a/docs/reference/ImplicationSet.html +++ b/docs/reference/ImplicationSet.html @@ -530,8 +530,8 @@

Examples

# Simplify the implication set fc_planets$implications$apply_rules("simplification") #> Processing batch -#> --> Simplification: from 10 to 10 in 0.023 secs. -#> Batch took 0.024 secs. +#> --> Simplification: from 10 to 10 in 0.024 secs. +#> Batch took 0.025 secs. diff --git a/docs/reference/grapes-twiddle-grapes.html b/docs/reference/grapes-twiddle-grapes.html index 3b414bf..0a9a976 100644 --- a/docs/reference/grapes-twiddle-grapes.html +++ b/docs/reference/grapes-twiddle-grapes.html @@ -109,7 +109,7 @@

Examples

imps2 <- imps$clone() imps2$apply_rules(c("simp", "rsimp")) #> Processing batch -#> --> Simplification: from 10 to 10 in 0.006 secs. +#> --> Simplification: from 10 to 10 in 0.005 secs. #> --> Right Simplification: from 10 to 10 in 0.021 secs. #> Batch took 0.027 secs. imps %~% imps2