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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/acepack_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/acepack/acepack_{{ version }}.tar.gz
  sha256: 82750507926f02a696f6cc03693e8d4a5ee7e92500c8c15a16a9c12addcd28b9

build:
  merge_build_host: True  # [win]
  number: 1007
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('fortran') }}  # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('m2w64_fortran') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://CRAN.R-project.org/package=acepack
  license: MIT
  license_file: LICENSE
  summary: Two nonparametric methods for multiple regression transform selection are provided.
    The first, Alternative Conditional Expectations (ACE),  is an algorithm to find
    the fixed point of maximal correlation, i.e. it finds a set of transformed response
    variables that maximizes R^2 using smoothing functions [see Breiman, L., and J.H.
    Friedman. 1985. "Estimating Optimal Transformations for Multiple Regression and
    Correlation". Journal of the American Statistical Association. 80:580-598. <doi:10.1080/01621459.1985.10478157>].
    Also included is the Additivity Variance Stabilization (AVAS) method which works
    better than ACE when correlation is low [see Tibshirani, R.. 1986. "Estimating Transformations
    for Regression via Additivity and Variance Stabilization". Journal of the American
    Statistical Association. 83:394-405.  <doi:10.1080/01621459.1988.10478610>]. A good
    introduction to these two methods is in chapter 16 of Frank Harrel's "Regression
    Modeling Strategies" in the Springer Series in Statistics.
  license_family: MIT

extra:
  recipe-maintainers:
    - conda-forge/r
