CHANGES IN VERSION 1.99.11
--------------------------

    o Concave windows (method = "image", window = "concave") are computed by a C++ port of concaveman, which
      gives the same polygon as concaveman::concaveman(); concaveman is no longer suggested.

CHANGES IN VERSION 1.99.10
--------------------------

    o New buildKnnGraph(): the k-nearest-neighbour graph between the cells of each image, from the C++ core,
      stored as a colPair for convPairs(). It gives the same graph as imcRtools::buildSpatialGraph(type =
      "knn"), so imcRtools is no longer suggested; pkgdown is no longer suggested either.

CHANGES IN VERSION 1.99.9
-------------------------

    o Vignette: the numbers quoted in the text are computed from the results, and the statements about them
      are checked when the vignette is built. The shuffled-label check uses 10 shuffles.

CHANGES IN VERSION 1.99.8
-------------------------

    o spicy(labelClustering = ) defaults to FALSE: the within-image variance is no longer inflated for
      `to` cells that cluster among themselves unless asked for.

CHANGES IN VERSION 1.99.7
-------------------------

    o spicy(variance = ) defaults to "cr2" again (CR2 on Satterthwaite df). "auto" (the Hartung-Knapp
      variance when a condition has at most 5 patients, CR2 otherwise) remains available as an option.

CHANGES IN VERSION 1.99.6
-------------------------

    o The allocation effect is now scaled on two sides. A pair whose `to` cells avoid the `from` cells (fewer
      `to` cells with a `from` cell within r than expected, summed over all images, without the conditions)
      uses (observed share - q) / q, the fraction of the `to` cells that would have a `from` cell nearby that
      were moved away; an attracting pair keeps (observed share - q) / (1 - q). Before, avoidance used the
      attraction scale, on which the effect of a fixed avoidance grows with q, i.e. with how many `from`
      cells there are and how densely they are packed, and is unbounded below as q approaches 1. The
      results gain a `side` column ("attract" or "avoid").

    o spicy(variance = ) gains "auto", the new default: the Hartung-Knapp variance on m - 2 df when a
      condition has at most 5 patients (CR2's Satterthwaite df are then very small), CR2 otherwise. The
      variance used is returned in $variance.

CHANGES IN VERSION 1.99.5
-------------------------

    o The cell method's default effect is the allocation effect (effect = "allocation"): the extra fraction
      of `to` cells with at least one `from` cell within r, (observed share - q) / (1 - q), q its exact
      expectation under random labelling. If a fraction f of the `to` cells is moved next to `from` cells,
      the effect is f, however many `from` cells there are and however densely they are packed. The count
      excess of earlier versions (extra `from` cells per `to` cell) is effect = "count"; it grows with how
      densely the `from` cells are packed, so a change in packing alone can appear as a change in
      co-localisation. Self-pairs use the exact random-labelling expectation of the allocation count.

    o spicy(adjustAbundance = ) now defaults to FALSE (kontextualEngine() is unchanged). The log-share
      adjustment does not separate more `from` cells from more densely packed ones, and it removes real
      effects when the share tracks the condition.

    o Survival results: the column log_hr_per_cell is renamed log_hr_per_unit, the log hazard ratio per unit
      of the effect (per 100% of `to` cells for the allocation effect, per extra `from` cell per `to` cell
      for the count).

    o The label-clustering factor of the allocation effect is computed on its binary scores.

    o Survival results no longer repeat the main test in unadjusted_* columns when abundance is not
      adjusted.

    o k nearest neighbours: images with at most k cells were read out of bounds in the neighbour sums; they
      are now skipped.

CHANGES IN VERSION 1.99.4
-------------------------

    o The label-clustering factor of a `to` type is the median over every counted (`from`) type, whichever pairs
      are requested, in spicy() and kontextualEngine(). A pair's result no longer depends on the other pairs asked
      for: spicy(from = "A", to = "B") gives exactly the A__B row of spicy(). Before, the factor rested on the
      requested pairs only (one ratio per image for a single pair), which in Kontextual simulations cost power.

CHANGES IN VERSION 1.99.3
-------------------------

NEW FEATURES

    o kontextualEngine(), the engine of Statial::kontextualTest() (documented there): Statial's
      Kontextual statistic compared in each image with its exact expectation under random labelling
      within the parent, combined by spicy()'s frailty GEE. Internal; topPairs(), signifPlot() and
      spicyBoxPlot(parent = ) work on its results.

    o signifPlot() draws the survival results of the cell method (it failed before).

    o spicy(alternateResult = ) warns when given Kontextual values, which it compares between conditions
      as they are, and points to Statial::kontextualTest().

CHANGES IN VERSION 1.99.2
-------------------------

    o The direction of a pair is reversed relative to 1.99.0 and 1.99.1 (and restored to that of
      earlier development versions): from -> to now asks whether `to` cells are placed near
      `from` cells, with the excess counted as extra `from` cells around each `to` cell. A result
      reported as A -> B by 1.99.0 or 1.99.1 is reported as B -> A now, with the same numbers.

CHANGES IN VERSION 1.99.0 (spicyR 2.0)
--------------------------------------

MAJOR CHANGES

    o spicy() now runs spicyR Cell by default (method = "cell"): for each pair from -> to,
      the excess number of `from` cells within r of each `to` cell beyond random labelling of
      the observed cells (are `to` cells placed near `from` cells more than other cells are?), combined over images and patients by a frailty GEE and tested with a
      CR2 variance on Satterthwaite degrees of freedom, with patients (`subject`) as the units.
      The original test is available with method = "image" (and is chosen automatically when
      `alternateResult` or `sigma` is given).

    o The direction of a pair: `to` is the type whose placement is tested (its cells are
      relabelled at random under the null, and the excess is per `to` cell), `from` the type
      counted around it.

NEW FEATURES

    o By default the test is adjusted for the abundance of the counted (`from`) type (the log of its share
      of all cells in each image; adjustAbundance = TRUE) and for any covariates; the unadjusted
      test is reported in the unadjusted_* columns, and each adjustment's effect and p-value in
      abundance_effect and <covariate>_effect columns.

    o spicyBoxPlot() shows a point per image sized by its weight in the test, and is interactive
      with interactive = TRUE (plotly); plotImage(r = ) draws the radius around each to cell.

    o Two or more conditions (each level against the reference), image- or patient-level
      covariates, k nearest neighbours (k), several radii combined by max-T with the sandwich
      correlation or by the Cauchy combination (r = c(...), combine), Hartung-Knapp variance for
      very few patients, and survival outcomes (a Surv condition: score test and hazard ratio).

    o The statistics run in a C++17 core shared verbatim with the Python twin, spicyr
      (https://github.com/SydneyBioX/spicyr-py), which reproduces spicyR's results.

    o Much faster: every ordered pair of 22 cell types from 400,000 cells (METABRIC) in seconds.

    o spicyR 2.0 was written with AI assistance (Claude, Anthropic, through Claude Code), directed by the
      authors: the C++ core, its R bindings, R/cell.R and R/spicy_main.R, the C++ ports
      of the image method's model fits, the tests (including a plain-R reference written from the
      method's equations) and the vignettes. The commits concerned carry a Co-Authored-By line.

    o Far fewer dependencies.

CHANGES IN VERSION 1.18.0
-------------------------

NEW FEATURES

    o Added functionality for survival and mixed effect survival analysis.
    
    o Added new plotting functions for survival analysis.
    
    o Added support for using weights for alternative results.
    

BUG FIXES

    o Fixed issue with bubble plot where unicode characters don't show up on
      certain operating systems.
    
    o Fixed issue with bubble plot where legend was not accurately showing 
      conditions or phenotypes on the plot.


SIGNIFICANT USER-VISIBLE CHANGES

    o Vignette has been updated with new dataset showcasing more functionality
      of spicyR.
      
DEPRECATED ARGUMENTS

    o `nCores` argument deprecated for both getPairwise() and spicy(), replaced 
    with `cores`.
    
    o `BPPARAM` argument deprecated for both getPairwise() and spicy(), replaced 
    with `cores`.
    
    o `imageIDCol` argument deprecated for both getPairwise() and spicy(), replaced 
    with `imageID`.
    
    o `cellTypeCol` argument deprecated for both getPairwise() and spicy(), replaced 
    with `cellType`.
    
    o `spatialCoordCols` argument deprecated for both getPairwise() and spicy(), replaced 
    with `spatialCoords`.
    
    o `Rs` argument deprecated for both getPairwise() and spicy(), replaced 
    with `r`.
    
* Deprecation warnings have been added to guide users to the new argument names.

    

