{% set version = '0.4.0' %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}
{% set cran_mirror = 'https://cran.r-project.org' %}

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

source:
  fn: ggeffects_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/ggeffects_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ggeffects/ggeffects_{{ version }}.tar.gz
  sha256: 81e131fa1f7f54c4961e43f057b23250219f95d75364bdb14d95b3bbf8065c70

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

requirements:
  build:
  host:
    - r-base
    - r-dplyr >=0.7.1
    - r-effects >=4.0_0
    - r-ggplot2 >=2.2.1
    - r-magrittr
    - r-prediction >=0.2.0
    - r-purrr
    - r-rlang
    - r-scales
    - r-sjlabelled >=1.0.11
    - r-sjmisc >=2.7.2
    - r-sjstats >=0.15.0
    - r-tibble >=1.3.3
    - r-tidyr >=0.7.0
    - r-tidyselect
  run:
    - r-base
    - r-dplyr >=0.7.1
    - r-effects >=4.0_0
    - r-ggplot2 >=2.2.1
    - r-magrittr
    - r-prediction >=0.2.0
    - r-purrr
    - r-rlang
    - r-scales
    - r-sjlabelled >=1.0.11
    - r-sjmisc >=2.7.2
    - r-sjstats >=0.15.0
    - r-tibble >=1.3.3
    - r-tidyr >=0.7.0
    - r-tidyselect

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

about:
  home: https://github.com/strengejacke/ggeffects, https://strengejacke.github.io/ggeffects
  license: GPL-3
  summary: Compute marginal effects at the mean or average marginal effects from  statistical
    models and returns the result as tidy data frames. These  data frames are ready
    to use with the 'ggplot2'-package. Marginal effects can be calculated for many different
    models. Interaction terms, splines and polynomial terms are also supported. The
    two main functions are ggpredict() and ggaverage(), however, there are some convenient
    wrapper-functions especially for polynomials or interactions. There is a generic
    plot()-method to plot the results using 'ggplot2'. 
  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:
    - nick-youngblut
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
