{% set version = '2.0.6' %}

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

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

source:
  fn: robCompositions_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/robCompositions_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/robCompositions/robCompositions_{{ version }}.tar.gz
  sha256: 1c86b2c6b933194d5f0ae370c54374418a0ebe4e190a60a392d025acb5e1e4e4

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

requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
    - {{ compiler('cxx') }}        # [unix]
    - {{ compiler('m2w64_cxx') }}  # [win]
  host:
    - r-base
    - r-ggally
    - r-mass
    - r-rcpp
    - r-vim
    - r-car
    - r-cluster
    - r-cvtools
    - r-data.table
    - r-e1071
    - r-fpc
    - r-ggplot2
    - r-kernlab
    - r-mclust
    - r-pls
    - r-robustbase
    - r-rrcov
    - r-sroc

  run:
    - r-base
    - r-ggally
    - r-mass
    - r-rcpp
    - r-vim
    - r-car
    - r-cluster
    - r-cvtools
    - r-data.table
    - r-e1071
    - r-fpc
    - r-ggplot2
    - r-kernlab
    - r-mclust
    - r-pls
    - r-robustbase
    - r-rrcov
    - r-sroc

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

about:
  home: https://CRAN.R-project.org/package=robCompositions
  license: GPL (>= 2)
  summary: Methods for analysis of compositional data including robust methods, imputation, methods
    to replace rounded zeros, (robust) outlier detection for compositional data, (robust)
    principal component analysis for compositional data, (robust) factor analysis for
    compositional data, (robust) discriminant analysis for compositional data (Fisher
    rule), robust regression with compositional predictors and (robust) Anderson-Darling
    normality tests for compositional data as well as popular log-ratio transformations
    (addLR, cenLR, isomLR, and their inverse transformations). In addition, visualisation
    and diagnostic tools are implemented as well as high and low-level plot functions
    for the ternary diagram.
  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:
    - dpryan79
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
