{% set version = '1.4' %}

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

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

source:
  fn: missForest_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/missForest_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/missForest/missForest_{{ version }}.tar.gz
  sha256: f785804b03bdf424e1c76095989a803afb3b47d6bebca9a6832074b6326c0278

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

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base
    - r-foreach
    - r-itertools
    - r-randomforest

  run:
    - r-base
    - r-foreach
    - r-itertools
    - r-randomforest

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

about:
  home: http://www.r-project.org, https://github.com/stekhoven/missForest
  license: GPL (>= 2)
  summary: The function 'missForest' in this package is used to impute missing values particularly
    in the case of mixed-type data. It uses a random forest trained on the observed
    values of a data matrix to predict the missing values. It can be used to impute
    continuous and/or categorical data including complex interactions and non-linear
    relations. It yields an out-of-bag (OOB) imputation error estimate without the need
    of a test set or elaborate cross-validation. It can be run in parallel to  save
    computation time.
  license_family: GPL3

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