{% set version = '1.3.4' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-dunn.test
  version: {{ version|replace("-", "_") }}

source:
  fn: dunn.test_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/dunn.test_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/dunn.test/dunn.test_{{ version }}.tar.gz
  sha256: 8b9e974d1b5ac2f2b1dde5e44425e21ff9abc8b9bfdd39e24afe038f374ad0ee

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base

  run:
    - r-base

test:
  commands:
    - $R -e "library('dunn.test')"  # [not win]
    - "\"%R%\" -e \"library('dunn.test')\""  # [win]

about:
  home: https://CRAN.R-project.org/package=dunn.test
  license: GPL-2
  summary: Computes Dunn's test (1964) for stochastic dominance and reports the results among
    multiple pairwise comparisons after a Kruskal-Wallis test for stochastic dominance
    among k groups (Kruskal and Wallis, 1952). The interpretation of stochastic dominance
    requires an assumption that the CDF of one group does not cross the CDF of the other.
    'dunn.test' makes k(k-1)/2 multiple pairwise comparisons based on Dunn's z-test-statistic
    approximations to the actual rank statistics. The null hypothesis for each pairwise
    comparison is that the probability of observing a randomly selected value from the
    first group that is larger than a randomly selected value from the second group
    equals one half; this null hypothesis corresponds to that of the Wilcoxon-Mann-Whitney
    rank-sum test. Like the rank-sum test, if the data can be assumed to be continuous,
    and the distributions are assumed identical except for a difference in location,
    Dunn's test may be understood as a test for median difference. 'dunn.test' accounts
    for tied ranks.
  license_family: GPL2

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
