{% set version = '1.3' %}

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

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

source:
  fn: PRROC_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/PRROC_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/PRROC/PRROC_{{ version }}.tar.gz
  sha256: cccb0d4c02e756054fb1ed75ba21714618b278e67b25452be124124c45821b0e

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

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=PRROC
  license: GPL-3
  summary: 'Computes the areas under the precision-recall (PR) and ROC curve for weighted (e.g.,
    soft-labeled) and unweighted data. In contrast to other implementations, the interpolation
    between points of the PR curve is done by a non-linear piecewise function. In addition
    to the areas under the curves, the curves themselves can also be computed and plotted
    by a specific S3-method. References: Davis and Goadrich (2006) <doi:10.1145/1143844.1143874>;
    Keilwagen et al. (2014) <doi:10.1371/journal.pone.0092209>; Grau et al. (2015) <doi:10.1093/bioinformatics/btv153>.'

  license_family: GPL3

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