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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/onehot_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/onehot/onehot_{{ version }}.tar.gz
  sha256: 3dc62f56459a4f912a41c46831d300cc818ec983306e78cb2405647e00f8bab1

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://CRAN.R-project.org/package=onehot
  license: MIT
  summary: Quickly create numeric matrices for machine learning algorithms that require them.
    It converts factor columns into onehot vectors.
  license_family: MIT
  license_file: LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r
    - xhochy

# Package: onehot
# Type: Package
# Title: Fast Onehot Encoding for Data.frames
# Version: 0.1.1
# Author: Eric E. Graves [aut, cre]
# Maintainer: Eric E. Graves <gravcon5@gmail.com>
# Description: Quickly create numeric matrices for machine learning algorithms that require them. It converts factor columns into onehot vectors.
# License: MIT + file LICENSE
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 6.0.1
# NeedsCompilation: yes
# Packaged: 2017-05-02 13:12:03 UTC; GravesEE
# Repository: CRAN
# Date/Publication: 2017-05-02 16:13:01 UTC
