{% 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:
  fn: acepack_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/acepack_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/acepack/acepack_{{ version }}.tar.gz

  sha256: 82750507926f02a696f6cc03693e8d4a5ee7e92500c8c15a16a9c12addcd28b9

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

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

requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base

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:
    - johanneskoester
    - bgruening
