{% set version = '1.0' %}

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

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

source:
  fn: mi_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/mi_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/mi/mi_{{ version }}.tar.gz
  sha256: 34f44353101e8c3cb6bf59c5f4ff5b2391d884dcbb9d23066a11ee756b9987c0

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

requirements:
  build:
    - r-base
    - r-matrix
    - r-arm >=1.4_11

  run:
    - r-base
    - r-matrix
    - r-arm >=1.4_11

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

about:
  home: http://www.stat.columbia.edu/~gelman/
  license: GPL (>= 2)
  summary: The mi package provides functions for data manipulation, imputing missing values in
    an approximate Bayesian framework, diagnostics of the models used to generate the
    imputations, confidence-building mechanisms to validate some of the assumptions
    of the imputation algorithm, and functions to analyze multiply imputed data sets
    with the appropriate degree of sampling uncertainty.
  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
