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

package:
  name: r-exact2x2
  version: {{ version|replace("-", "_") }}

source:
  fn: exact2x2_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/exact2x2_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/exact2x2/exact2x2_{{ version }}.tar.gz
  sha256: f6a920469bc7707ca258e44a7ea1c9bfbd68ab154ce8a1ed22974869a4815e85

build:
  merge_build_host: True  # [win]
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-exactci
    - r-ssanv
  run:
    - r-base
    - r-exactci
    - r-ssanv

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

about:
  home: https://CRAN.R-project.org/package=exact2x2
  license: GPL-3
  summary: Calculates conditional exact tests (Fisher's exact test, Blaker's exact test, or  exact
    McNemar's test) and unconditional exact tests (including score-based tests on differences
    in proportions, ratios of proportions, and odds ratios, and Boshcloo's test) with
    appropriate matching confidence intervals, and provides power and sample size calculations.
    Gives melded confidence intervals for the binomial case. Gives boundary-optimized
    rejection region test (Gabriel, et al, 2018, <DOI:10.1002/sim.7579>), an unconditional
    exact test for the situation where the controls are all expected to fail.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

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