anthro-js

0.0.7 • Public • Published

anthro-js

This is a javascript adaptation of the z-score portion of Dirk Schumacher's anthro library for R. It will supply z-scores for anthropometric measurements based on standards developed by the WHO. For more information on the method, inputs and outputs, see Schumacher's repo or the CRAN documentation.

Function arguments are mirrored as closely as possible, however javascript has no native concept of data frames or NA variables. Thus the anthro_zscore function has been modified to operate only element-wise. It will require a row-wise application if being applied to a table of measurements.

Installation

npm i anthro-js

Usage

var anthro_zscores = require('anthro-js').default; or if using ES6: import anthro_zscores from 'anthro-js';

To call:

anthro_zscores({
  sex, //sex is 'm','f', 1, or 2
  age, //age in months or days
  is_age_in_month = false, //boolean denoting whether age is in months or days
  weight, //kg
  lenhei, //cm
  measure, //type of measure for lenhei, either recumbent length or standing height
  headc, //head circumference measurement
  armc, //upper arm circumference
  triskin, // triceps skinfold measurement
  subskin, //subscapular skinfold measurement
  oedema = 'n',
  })

Package Sidebar

Install

npm i anthro-js

Weekly Downloads

6

Version

0.0.7

License

ISC

Unpacked Size

5.09 MB

Total Files

80

Last publish

Collaborators

  • adanderson