{% set version = '1.1' %}

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

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

source:
  fn: LINselect_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/LINselect_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/LINselect/LINselect_{{ version }}.tar.gz
  sha256: 981f40b08efdf5fc91cf7f879e067459052a115462a18b01e06653eeec3da9b7

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

requirements:
  build:
    - r-base
    - r-mass
    - r-elasticnet
    - r-gtools
    - r-mvtnorm
    - r-pls
    - r-randomforest

  run:
    - r-base
    - r-mass
    - r-elasticnet
    - r-gtools
    - r-mvtnorm
    - r-pls
    - r-randomforest

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

about:
  home: https://CRAN.R-project.org/package=LINselect
  license: GPL (>= 3)
  summary: Estimate the mean of a Gaussian vector, by choosing among a large collection of estimators.
    In particular it solves the problem of variable selection by choosing the best predictor
    among  predictors emanating from different methods as lasso, elastic-net, adaptive
    lasso, pls, randomForest. Moreover, it can be applied for choosing the tuning parameter
    in a Gauss-lasso procedure.
  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:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
