{% set version = '1.7.3.21' %}

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

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

source:
  fn: psych_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/psych_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/psych/psych_{{ version }}.tar.gz
  sha256: 89717bd54c097f417884de4358b4df6f0e016678cf61fca0d01ae97a0054ccea

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

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

requirements:
  build:
    - r-base
    - r-foreign
    - r-lattice
    - r-mnormt
    - r-nlme

  run:
    - r-base
    - r-foreign
    - r-lattice
    - r-mnormt
    - r-nlme

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

about:
  home: http://personality-project.org/r/psych http://personality-project.org/r/psych-manual.pdf
  license: GPL (>= 2)
  summary: A general purpose toolbox for personality, psychometric theory and experimental psychology.   Functions
    are primarily for multivariate analysis and scale construction using factor analysis,
    principal component analysis, cluster analysis and reliability analysis, although
    others provide basic descriptive statistics. Item Response Theory is done using  factor
    analysis of tetrachoric and polychoric correlations. Functions for analyzing data
    at multiple levels include within and between group statistics, including correlations
    and factor analysis.   Functions for simulating and testing particular item and
    test structures are included. Several functions  serve as a useful front end for
    structural equation modeling.  Graphical displays of path diagrams, factor analysis
    and structural equation models are created using basic graphics. Some of the functions
    are written to support a book on psychometric theory as well as publications in
    personality research. For more information, see the <http://personality-project.org/r>
    web page.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
