{% set version = "1.3-7" %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

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

source:
  url:
    - https://cran.r-project.org/src/contrib/party_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/party/party_{{ version }}.tar.gz
  sha256: f01c6164a3eb878a6a7ba90ac4e7b466d657c905f98985ccb48417f0f53f93df

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-coin >=1.1_0
    - r-modeltools >=0.2_21
    - r-mvtnorm >=1.0_2
    - r-sandwich >=1.1_1
    - r-strucchange
    - r-survival >=2.37_7
    - r-zoo
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-coin >=1.1_0
    - r-modeltools >=0.2_21
    - r-mvtnorm >=1.0_2
    - r-sandwich >=1.1_1
    - r-strucchange
    - r-survival >=2.37_7
    - r-zoo

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

about:
  home: http://party.R-forge.R-project.org
  license: GPL-2.0-only
  summary: A computational toolbox for recursive partitioning. The core of the package is ctree(), an implementation of conditional inference trees which embed tree-structured  regression models into a well defined theory of conditional inference procedures. This non-parametric class of regression trees is applicable to
    all kinds of regression problems, including nominal, ordinal, numeric, censored as well as multivariate response variables and arbitrary measurement scales of the covariates.  Based on conditional inference trees, cforest() provides an implementation of Breiman's random forests. The function mob() implements an algorithm
    for recursive partitioning based on parametric models (e.g. linear models, GLMs or survival regression) employing parameter instability tests for split selection. Extensible functionality for visualizing tree-structured regression models is available. The methods are described in Hothorn et al. (2006) <doi:10.1198/106186006X133933>,
    Zeileis et al. (2008) <doi:10.1198/106186008X319331> and  Strobl et al. (2007) <doi:10.1186/1471-2105-8-25>.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - conda-forge/r
