{% set version = '1.1.3' %}

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

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

source:
  fn: emmeans_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/emmeans_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/emmeans/emmeans_{{ version }}.tar.gz
  sha256: c2ed9932a30156117ceeeb67af16b15d8c0a5796444b40846355ebea0b7b1394

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

requirements:
  build:
    - r-base
    - r-coda >=0.17
    - r-estimability >=1.3
    - r-ggplot2
    - r-multcomp
    - r-mvtnorm
    - r-nlme
    - r-plyr
    - r-xtable >=1.8_2

  run:
    - r-base
    - r-coda >=0.17
    - r-estimability >=1.3
    - r-ggplot2
    - r-multcomp
    - r-mvtnorm
    - r-nlme
    - r-plyr
    - r-xtable >=1.8_2

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

about:
  home: https://github.com/rvlenth/emmeans
  license: GPL-2 | GPL-3
  summary: 'Obtain estimated marginal means (EMMs) for many linear, generalized  linear, and mixed
    models. Compute contrasts or linear functions of EMMs, trends, and comparisons of
    slopes. Plots and compact letter displays. Least-squares means are discussed, and
    the term "estimated marginal means" is suggested, in Searle, Speed, and Milliken
    (1980) Population marginal means in the linear model: An alternative to least squares means,
    The American Statistician 34(4), 216-221 <doi:10.1080/00031305.1980.10483031>.'
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

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