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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/arrApply_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/arrApply/arrApply_{{ version }}.tar.gz
  sha256: 671c1e53b418191950cf6ddad56ef28d61dd1f367b69e6f570390354228fc763

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-rcpp >=0.12.0
    - r-rcpparmadillo
    - libblas
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-rcpp >=0.12.0
    - r-rcpparmadillo

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

about:
  home: https://CRAN.R-project.org/package=arrApply
  license: GPL-2
  summary: 'High performance variant of apply() for a fixed set of functions. Considerable speedup
    is a trade-off for universality, user defined functions cannot be used with this
    package. However, 21 most currently employed functions are available for usage.
    They can be divided in three types: reducing functions (like mean(), sum() etc.,
    giving a scalar when applied to a vector), mapping function (like normalise(), cumsum()
    etc., giving a vector of the same length as the input vector) and finally, vector
    reducing function (like diff() which produces result vector of a length different
    from the length of input vector). Optional or mandatory additional arguments required
    by some functions (e.g. norm type for norm() or normalise() functions) can be passed
    as named arguments in ''...''.'
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'
extra:
  recipe-maintainers:
    - conda-forge/r
    - sgsokol

# Package: arrApply
# Type: Package
# Title: Apply a Function to a Margin of an Array
# Version: 2.1
# Date: 2019-03-08
# Author: Serguei Sokol
# Maintainer: Serguei Sokol <sokol@insa-toulouse.fr>
# Description: High performance variant of apply() for a fixed set of functions. Considerable speedup is a trade-off for universality, user defined functions cannot be used with this package. However, 21 most currently employed functions are available for usage. They can be divided in three types: reducing functions (like mean(), sum() etc., giving a scalar when applied to a vector), mapping function (like normalise(), cumsum() etc., giving a vector of the same length as the input vector) and finally, vector reducing function (like diff() which produces result vector of a length different from the length of input vector). Optional or mandatory additional arguments required by some functions (e.g. norm type for norm() or normalise() functions) can be passed as named arguments in '...'.
# License: GPL (>= 2)
# Imports: Rcpp (>= 0.12.0)
# LinkingTo: Rcpp, RcppArmadillo
# Suggests: testthat
# RoxygenNote: 6.1.1
# SystemRequirements: C++11
# NeedsCompilation: yes
# Packaged: 2019-03-08 14:21:21 UTC; sokol
# Repository: CRAN
# Date/Publication: 2019-03-08 15:02:45 UTC
