{% set version = '0.7.0' %}
{% set native = 'm2w64-' if win else '' %}

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

source:
  fn: ranger_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/ranger_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/ranger/ranger_{{ version }}.tar.gz
  sha256: 83f4b06c6e63da979a20b757aaf0042928db453c12d89281afd40046e6b5393c

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

requirements:
  build:
    - r-base
    - r-rcpp
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-rcpp

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

about:
  home: https://github.com/imbs-hl/ranger
  license: GPL-3
  summary: A fast implementation of Random Forests, particularly suited for high dimensional
    data. Ensembles of classification, regression, survival and probability prediction
    trees are supported. Data from genome-wide association studies can be analyzed efficiently.
    In addition to data frames, datasets of class 'gwaa.data' (R package 'GenABEL')
    can be directly analyzed.
  license_family: GPL

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