{% set version = '0.1.0' %}

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

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

source:
  fn: kpeaks_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/kpeaks_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/kpeaks/kpeaks_{{ version }}.tar.gz
  sha256: 68e6e1a1d2aaac2cd409fb6829995b4ad29a8c32fe8214022c6343ed39b3b7e3

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

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=kpeaks
  license: GPL (>= 2)
  summary: The input argument k which is the number of clusters is needed to start all of the
    partitioning clustering algorithms. In unsupervised learning applications, an optimal
    value of this argument is widely determined by using the internal validity indexes.
    Since these indexes suggest a k value which is computed on the clustering results
    after several runs of a clustering algorithm they are computationally expensive.
    On the contrary, 'kpeaks' enables to estimate k before running any clustering algorithm.
    It is based on a simple novel technique using the descriptive statistics of peak
    counts of the features in a data set.
  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:
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
