{% set version = '4.1-8' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/glmnet_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/glmnet/glmnet_{{ version }}.tar.gz
  sha256: 1ddbe5ce07076d1bdf58b0202ebd0ceac8eeb4796c5175681adb9e58c30ddcfe

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: knitr, lars, testthat, xfun, rmarkdown
requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ compiler('fortran') }}        # [not win]
    - {{ compiler('m2w64_fortran') }}  # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]

  host:
    - r-base
    - r-matrix >=1.0_6
    - r-rcpp
    - r-rcppeigen
    - r-foreach
    - r-shape
    - r-survival

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-matrix >=1.0_6
    - r-rcpp
    - r-rcppeigen
    - r-foreach
    - r-shape
    - r-survival

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('glmnet')"           # [not win]
    - "\"%R%\" -e \"library('glmnet')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://glmnet.stanford.edu
  license: GPL-2
  summary: Extremely efficient procedures for fitting the entire lasso or elastic-net regularization
    path for linear regression, logistic and multinomial regression models, Poisson
    regression, Cox model,  multiple-response Gaussian, and the grouped multinomial
    regression; see <doi:10.18637/jss.v033.i01> and <doi:10.18637/jss.v039.i05>. There
    are two new and important additions. The family argument can be a GLM family object,
    which opens the door to any programmed family (<doi:10.18637/jss.v106.i01>). This
    comes with a modest computational cost, so when the built-in families suffice, they
    should be used instead.  The other novelty is the relax option, which refits each
    of the active sets in the path unpenalized. The algorithm uses cyclical coordinate
    descent in a path-wise fashion, as described in the papers cited.
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: glmnet
# Type: Package
# Title: Lasso and Elastic-Net Regularized Generalized Linear Models
# Version: 4.1-8
# Date: 2023-08-19
# Authors@R: c(person("Jerome", "Friedman", role=c("aut")), person("Trevor", "Hastie", role=c("aut", "cre"), email = "hastie@stanford.edu"), person("Rob", "Tibshirani", role=c("aut")), person("Balasubramanian", "Narasimhan", role=c("aut")), person("Kenneth","Tay",role=c("aut")), person("Noah", "Simon", role=c("aut")), person("Junyang", "Qian", role=c("ctb")), person("James", "Yang", role=c("aut")))
# Depends: R (>= 3.6.0), Matrix (>= 1.0-6)
# Imports: methods, utils, foreach, shape, survival, Rcpp
# Suggests: knitr, lars, testthat, xfun, rmarkdown
# SystemRequirements: C++17
# Description: Extremely efficient procedures for fitting the entire lasso or elastic-net regularization path for linear regression, logistic and multinomial regression models, Poisson regression, Cox model,  multiple-response Gaussian, and the grouped multinomial regression; see <doi:10.18637/jss.v033.i01> and <doi:10.18637/jss.v039.i05>. There are two new and important additions. The family argument can be a GLM family object, which opens the door to any programmed family (<doi:10.18637/jss.v106.i01>). This comes with a modest computational cost, so when the built-in families suffice, they should be used instead.  The other novelty is the relax option, which refits each of the active sets in the path unpenalized. The algorithm uses cyclical coordinate descent in a path-wise fashion, as described in the papers cited.
# License: GPL-2
# VignetteBuilder: knitr
# Encoding: UTF-8
# URL: https://glmnet.stanford.edu
# RoxygenNote: 7.2.3
# LinkingTo: RcppEigen, Rcpp
# NeedsCompilation: yes
# Packaged: 2023-08-20 00:30:42 UTC; hastie
# Author: Jerome Friedman [aut], Trevor Hastie [aut, cre], Rob Tibshirani [aut], Balasubramanian Narasimhan [aut], Kenneth Tay [aut], Noah Simon [aut], Junyang Qian [ctb], James Yang [aut]
# Maintainer: Trevor Hastie <hastie@stanford.edu>
# Repository: CRAN
# Date/Publication: 2023-08-22 03:10:09 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
