{% set version = "2.4.8" %}

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

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

source:
  fn: fda_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/fda_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/fda/fda_{{ version }}.tar.gz
  sha256: 425b9ce2f145e258e9d9118177d5c3a80c61215bf5e750ecbf118607d7cf6958

build:
  number: 1
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-matrix

  run:
    - r-base
    - r-matrix

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

about:
  home: http://www.functionaldata.org
  license: GPL (>= 2)
  summary: |
    These functions were developed to support functional data analysis as described in
    Ramsay, J. O. and Silverman, B. W. (2005) Functional Data Analysis. New York: Springer.  They
    were ported from earlier versions in Matlab and S-PLUS.  An introduction appears
    in Ramsay, J. O., Hooker, Giles, and Graves, Spencer (2009) Functional Data Analysis
    with R and Matlab (Springer). The package includes data sets and script files working
    many examples including all but one of the 76 figures in this latter book.  Matlab
    versions of the code and sample analyses are no longer distributed through CRAN,
    as they were when the book was published.  For those, ftp from <http://www.psych.mcgill.ca/misc/fda/downloads/FDAfuns/>
    There you find a set of .zip files containing the functions and sample analyses,
    as well as two .txt files giving instructions for installation and some additional
    information. The changes from Version 2.4.1 are fixes of bugs in density.fd and
    removal of functions create.polynomial.basis, polynompen, and  polynomial. These
    were deleted because the monomial basis does the same thing and because there were
    errors in the code.
  license_family: GPL3

extra:
  recipe-maintainers:
    - dpryan79
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
