Skip to content

Commit

Permalink
Better handling of object and attribute names in context plots.
Browse files Browse the repository at this point in the history
  • Loading branch information
neuroimaginador committed Nov 30, 2023
1 parent 6c11580 commit aef9a64
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 32 deletions.
7 changes: 4 additions & 3 deletions R/plot_context.R
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
)) |>
Expand All @@ -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"
)

Expand Down
5 changes: 2 additions & 3 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions doc/concept_lattice.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions doc/implications.html
Original file line number Diff line number Diff line change
Expand Up @@ -975,9 +975,9 @@ <h2>Simplification Logic</h2>
<div class="sourceCode" id="cb16"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a>fc_I<span class="sc">$</span>implications<span class="sc">$</span><span class="fu">apply_rules</span>(<span class="at">rules =</span> <span class="fu">c</span>(<span class="st">&quot;composition&quot;</span>,</span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;simplification&quot;</span>))</span>
<span id="cb16-3"><a href="#cb16-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Processing batch</span></span>
<span id="cb16-4"><a href="#cb16-4" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; --&gt; Composition: from 12 to 12 in 0.001 secs.</span></span>
<span id="cb16-5"><a href="#cb16-5" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; --&gt; Simplification: from 12 to 12 in 0.03 secs.</span></span>
<span id="cb16-6"><a href="#cb16-6" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Batch took 0.031 secs.</span></span></code></pre></div>
<span id="cb16-4"><a href="#cb16-4" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; --&gt; Composition: from 12 to 12 in 0 secs.</span></span>
<span id="cb16-5"><a href="#cb16-5" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; --&gt; Simplification: from 12 to 12 in 0.029 secs.</span></span>
<span id="cb16-6"><a href="#cb16-6" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Batch took 0.029 secs.</span></span></code></pre></div>
<p>This enables the reduction of the cardinality and/or the size of the
<code>ImplicationSet</code>.</p>
<p>In addition, the “simplification” rule to remove redundancies can be
Expand Down Expand Up @@ -1011,8 +1011,8 @@ <h2>Entailment and equivalence of implications</h2>
<span id="cb18-5"><a href="#cb18-5" aria-hidden="true" tabindex="-1"></a><span class="co"># where we have removed redundancies</span></span>
<span id="cb18-6"><a href="#cb18-6" aria-hidden="true" tabindex="-1"></a>imps2<span class="sc">$</span><span class="fu">apply_rules</span>(<span class="fu">c</span>(<span class="st">&quot;simp&quot;</span>, <span class="st">&quot;rsimp&quot;</span>))</span>
<span id="cb18-7"><a href="#cb18-7" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Processing batch</span></span>
<span id="cb18-8"><a href="#cb18-8" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; --&gt; Simplification: from 10 to 10 in 0.006 secs.</span></span>
<span id="cb18-9"><a href="#cb18-9" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; --&gt; Right Simplification: from 10 to 10 in 0.023 secs.</span></span>
<span id="cb18-8"><a href="#cb18-8" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; --&gt; Simplification: from 10 to 10 in 0.005 secs.</span></span>
<span id="cb18-9"><a href="#cb18-9" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; --&gt; Right Simplification: from 10 to 10 in 0.024 secs.</span></span>
<span id="cb18-10"><a href="#cb18-10" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; Batch took 0.029 secs.</span></span>
<span id="cb18-11"><a href="#cb18-11" aria-hidden="true" tabindex="-1"></a><span class="co"># Any implication in imps2 follows from imps</span></span>
<span id="cb18-12"><a href="#cb18-12" aria-hidden="true" tabindex="-1"></a>imps <span class="sc">%entails%</span> imps2</span>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions docs/articles/extending_equivalence.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions docs/articles/implications.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

4 changes: 2 additions & 2 deletions docs/reference/ImplicationSet.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/grapes-twiddle-grapes.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aef9a64

Please sign in to comment.