{% set version = '0.17-8' %}

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

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

source:
  fn: afex_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/afex_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/afex/afex_{{ version }}.tar.gz
  sha256: 83d84943ec78ecdaae83539dd094e5f129f64d61e722d8d66d425302ae35eafa

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

requirements:
  build:
    - r-base
    - r-car
    - r-coin
    - r-lme4 >=1.1_8
    - r-lmertest
    - r-lsmeans >=2.17
    - r-pbkrtest >=0.4_1
    - r-reshape2
    - r-stringr
  run:
    - r-base
    - r-car
    - r-coin
    - r-lme4 >=1.1_8
    - r-lmertest
    - r-lsmeans >=2.17
    - r-pbkrtest >=0.4_1
    - r-reshape2
    - r-stringr

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

about:
  home: http://afex.singmann.science/, https://github.com/singmann/afex
  license: GPL (>= 2)
  summary: |
    Convenience functions for analyzing factorial experiments using ANOVA or mixed models.
    aov_ez(), aov_car(), and aov_4() allow specification of between, within (i.e., repeated-measures),
    or mixed between-within (i.e., split-plot) ANOVAs for data in long format (i.e.,
    one observation per row), aggregating multiple observations per individual and cell
    of the design. mixed() fits mixed models using lme4::lmer() and computes p-values
    for all fixed effects using either Kenward-Roger or Satterthwaite approximation
    for degrees of freedom (LMM only), parametric bootstrap (LMMs and GLMMs), or likelihood
    ratio tests (LMMs and GLMMs). afex uses type 3 sums of squares as default (imitating
    commercial statistical software).
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
