{% set version = '2.0.9' %}
{% 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:
    - {{ cran_mirror }}/src/contrib/robCompositions_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/robCompositions/robCompositions_{{ version }}.tar.gz
  sha256: 83feb8bede9289c22592256f95f2e79e2b850b0e1da9470555a2496bea048702

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [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
    - r-zcompositions
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - 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
    - r-zcompositions

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
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
