- The new version of the package includes many changes recommended by the good folks at rOpenSci, who are reviewing the package.
- BREAKING CHANGES:
- Conversion between anthropometric values and z-scores/centiles is now
done with
value2zscore()
,value2centile()
,zscore2value()
, andcentile2value()
.- The
family
andacronym
arguments are used to select a specific growth standard.
- The
- The
classify_*()
family of functions no longer take vectors as input, but instead takedata.frame
-like objects.
- Conversion between anthropometric values and z-scores/centiles is now
done with
- NEW FEATURES:
- Use
classify_growth()
to get data on multiple growth indicators at the same time. It will try to compute as many growth outcomes (i.e. size-for-GA, SVN, stunting, wasting, weight-for-age and head size) as possible based on the data you provide, and will tell you which analyses were performed. - The GIGS z-scoring functions are explicitly user-facing now. Go check out
gigs_waz()
and friends for easy z-scoring using GIGS-recommended standards. - An
id
parameter forclassify_growth()
and friends, as well as the GIGS z-scoring functions. This parameter informs the functions about who each data point is from, so that birth measurements for each individual can be identified and assessed appropriately. - The
compute_*()
functions for growth analysis. These functions take several vectors containing anthropometric measurements, age, and sex; they return a factor of growth categories. They are equivalent to theclassify_*()
functions from v0.4.1 and earlier. - The
categorise_*()
functions for growth analysis. These functions take vectors of growth centiles/z-scores as input, and return a factor of growth categories. - Added the INTERGROWTH-21st standard for estimated fetal weight based on
the Hadlock formula. The is available through
value2zscore()
and friends provided thatfamily = "ig_fet"
andacronym = "hefwfga"
. - You can now set all GIGS options at once with
gigs_options_set()
.
- Use
- FIXES:
- Z-scoring based on GIGS-recommended standards now accounts for measurements from different individuals, whereas in earlier versions the z-scoring logic treated data as if it all came from the same individual.
.gigs_options
is now actively exported by gigs and available to end-users.
- INTERNAL/DOCS CHANGES:
- Errors, warnings, and messages from GIGS are now handled with
rlang::abort()
and friends, and looks much prettier. - Updates to the 'Getting Started' vignette and 'Benchmarking' article.
- Other non-breaking changes to documentation and test suite.
- Errors, warnings, and messages from GIGS are now handled with
- Changes to documentation to facilitate
autotest::autotest_package()
pass. - Minor changes to vignettes for new patched version.
- BREAKING CHANGES:
- Changed name of
classify_sga()
toclassify_sfga()
- Changed name of
- NEW FEATURES:
- Added INTERGROWTH-21st Fetal standards, including the Fetal Growth standards, Fetal Doppler standards, Brain Development, and more!
- The INTERGROWTH-21st Postnatal Growth (
ig_png
) conversion functions now accept post-menstrual age in weeks (pma_weeks
) as either whole weeks or decimals, e.g.37
or37.142857
, where37.142857
is equal to37
weeks +1
day, so37 + 1/7
weeks. - Added
checkmate
-based verification of inputs, with customisedwarning()
andstop()
mechanisms to exported functions. See documentation for allowed data types/lengths in each function argument. - gigs package options via
.gigs_options
, which lets you customise warning and error behaviour as you see fit.
- INTERNAL/DOCS CHANGES:
- Added statistical review roclets tags.
- Better documentation, for compliance with SRR tags.
- Internal, non-breaking changes to test suite and documentation.
- Internal, non-breaking changes to test suite and documentation.
- Classification functions now use
gigs_**z()
functions internally for z-scoring. These z-scoring functions, found ingigs-zscoring.R
, will be made user-facing once the GIGS guidance documentation is made public.
- This update includes several large changes to the GIGS interface, including changed argument names for some classification and conversion functions. We have only not used a major release as the package may still change with the release of the GIGS guidance document.
- BREAKING CHANGES:
- Replaced
gest_age
parameter withgest_days
in all circumstances, includingig_nbs
growth curve/coefficient tables. classify_wasting()
now takes in gestational age/age data, and uses this to apply the INTERGROWTH-21st Postnatal Growth standard for weight-for-length where appropriate.- Changed out
percentile
forcentile
in function names and documentation. Argument names left unchanged, so centiles are still passed into functions asp
.
- Replaced
- NEW FEATURES:
- Added
classify_svn()
function, which classifies newborns into the categories used in the Lancet's 2023 Small Vulnerable Newborn (SVN) Series.
- Added
- INTERNAL/DOCS CHANGES:
- Updated coefficient retrieval functions to run ~ 2 times as fast as in version 0.2.3.
- Added type checking functions to conversion functions, along with additional unit tests to make sure they work.
- Extensive changes to documentation structure. These changes appear
internally, where the roxygen documentation uses more
@inherit
/@inheritParams
tags. - Added vignette displaying performance differences between gigs and other, similar R packages, as well as Stata implementations.
- Updated regression equations for the normative body composition standards in
ig_nbs
, namelyfmfga
,ffmfga
, andbfpfga
. These functions give outputs much closer to the published centiles, though a degree of error is still present. - Updated and improved body composition vignette to include the new derivation process.
- The coefficient-based
ig_nbs
/who_gs
functions are now 30 to 10x quicker depending on the length of the function inputs (more inputs = slower).- This comes from removal of the
data.table
dependency - all coefficient retrieval/interpolation now occurs using matrices. The move from usingdata.table.merge()
to subsetting operators has sped up the code significantly.
- This comes from removal of the
- More consistent subsetting operators and terminology in package source code.
- Optimised interpolation for coefficient-based
who_gs_...()
/ig_nbs_...()
functions. No more for-loops with rbind - instead, theapprox()
function for interpolation is called on vectors. - Began using
data.table
for retrieving/merging coefficient tables, in a new helper function namedretrive_coefficients()
. This approach is slower for smaller inputs than the olddata.frame
approach, but maintains a much lower time as the number of inputs are increased. It also concentrates all the coefficient-retrieval logic in one group of common functions. - Minor changes to
README.md
and small refactors for readability.
- Renamed
coarse
parameter inclassify_sga()
tosevere
to better reflect its function; now settingsevere
toFALSE
will causeclassify_sga()
to specify which SGA cases are below the 3rd percentile. - Documentation updates:
- Full use of <sup> tags for pkgdown website
- Standardised titles in documentation for conversion + classification functions
- Updated "Introduction to gigs" article to include all available classification functions
- Extra docs changes which can be viewed in the diffs for this commit (e.g.,
replacing all
@returns
Roxygen tags with@return
)
- Added INTERGROWTH-21st Postnatal Growth tables + functions for a new
weight-for-length standard. These include
ig_png_wfl_value2zscore()
andig_png_wfl_percentile2value()
. - Refactored
check_params.R
to be more standard-specific. Added some comments as the purpose of this code was unclear. May refactor later to make more self-evidently important.
classify_sga()
now uses<
and>
, not<=
and>=
to determine LGA/SGA cut-offs. This aligns this function with the 'correct' methodology for calculating size for GA.
- Major documentation updates
- Added
life6mo
dataset - Added 'Getting Started' vignette
- Created package
- Added a
NEWS.md
file to track changes to the package. - Added conversion functions (e.g.
who_gs_value2zscore()
/ig_png_value2percentile()
) - Added classification functions (e.g.
classify_sga()
) - Added reference datasets (e.g.
ig_nbs
,who_gs
,who_gs_coeffs
)