{% set version = '2.12.1' %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}
{% set cran_mirror = 'https://cran.r-project.org' %}

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

source:
  fn: mlr_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/mlr_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/mlr/mlr_{{ version }}.tar.gz
  sha256: 9cbb98b82eb493b783fe8808a18d76f32881d941364466ef8829b852fabbc82c

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed  # [win]
    - {{posix}}coreutils  # [win]
  host:
    - r-base
    - r-bbmisc >=1.11
    - r-paramhelpers >=1.10
    - r-xml
    - r-backports >=1.1.0
    - r-checkmate >=1.8.2
    - r-data.table
    - r-ggplot2
    - r-parallelmap >=1.3
    - r-stringi
    - r-survival
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-bbmisc >=1.11
    - r-paramhelpers >=1.10
    - r-xml
    - r-backports >=1.1.0
    - r-checkmate >=1.8.2
    - r-data.table
    - r-ggplot2
    - r-parallelmap >=1.3
    - r-stringi
    - r-survival

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

about:
  home: https://github.com/mlr-org/mlr
  license: BSD_2_clause
  summary: Interface to a large number of classification and regression techniques, including
    machine-readable parameter descriptions. There is also an experimental extension
    for survival analysis, clustering and general, example-specific cost-sensitive learning.
    Generic resampling, including cross-validation, bootstrapping and subsampling. Hyperparameter
    tuning with modern optimization techniques, for single- and multi-objective problems.
    Filter and wrapper methods for feature selection. Extension of basic learners with
    additional operations common in machine learning, also allowing for easy nested
    resampling. Most operations can be parallelized.
  license_family: BSD

extra:
  recipe-maintainers:
    - nick-youngblut
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
