{% set version = "0.3.2" %}

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

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

source:
  fn: prediction_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/prediction_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/prediction/prediction_{{ version }}.tar.gz
  sha256: c053e2fbfc0b605acef8f901e365226ed7903afc1f10c1b6d7493f120d00c5a8

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

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

requirements:
  build:
    - r-base
    - r-data.table

  run:
    - r-base
    - r-data.table

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

about:
  home: https://github.com/leeper/prediction
  license: MIT
  summary: A one-function package containing 'prediction()', a type-safe alternative to 'predict()'
    that always returns a data frame. The package currently supports common model types
    (e.g., "lm", "glm") from the 'stats' package, as well as numerous other model classes
    from other add-on packages. See the README or main package documentation page for
    a complete listing.
  license_family: MIT

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