ropensci / software-review

rOpenSci Software Peer Review.
286 stars 104 forks source link

gigs: Assess Fetal, Newborn, and Child Growth with International Standards #626

Open simpar1471 opened 4 months ago

simpar1471 commented 4 months ago

Submitting Author Name: Simon Parker Submitting Author Github Handle: !--author1-->@simpar1471<!--end-author1-- Repository: https://github.com/lshtm-gigs/gigs/ Version submitted: 0.4.1 Submission type: Stats Badge grade: silver Editor: !--editor-->@rkillick<!--end-editor-- Reviewers: TBD

Archive: TBD Version accepted: TBD Language: en

Type: Package
Package: gigs
Title: Assess Fetal, Newborn, and Child Growth with International Standards
Version: 0.4.1
Authors@R: c(
    person(given = "Simon", family = "Parker",
           email = "simon.parker@lshtm.ac.uk",
           role = c("aut", "cre"), comment = c(ORCID = "0009-0003-8214-4496")),
    person(given = "Linda", family = "Vesel", role = c("dtc"),
           comment = c(ORCID = "0000-0003-3753-4172")),
    person(given = "Eric", family = "Ohuma", role = c("dtc"),
           comment = c(ORCID = "0000-0002-3116-2593")),
    person(given = "Bill & Melinda Gates Foundation", role = c("fnd", "cph"))
    )
Description: Convert between anthropometric measures and z-scores/centiles in
    multiple growth standards, and classify fetal, newborn, and child growth
    accordingly. With a simple interface to growth standards from the World
    Health Organisation and International Fetal and Newborn Growth Consortium
    for the 21st Century, gigs makes growth assessment easy and reproducible for
    clinicians, researchers and policy-makers.
License: GPL (>= 3)
URL: https://github.com/lshtm-gigs/gigs/,
    https://lshtm-gigs.github.io/gigs/
BugReports: https://github.com/lshtm-gigs/gigs/issues
Depends: 
    R (>= 4.1.0)
Imports:
    stats,
    gamlss.dist,
    checkmate,
    vctrs
Suggests:
    knitr,
    rmarkdown,
    testthat (>= 3.0.0),
    units,
    withr
VignetteBuilder: knitr
Config/testthat/edition: 3
Config/testthat/parallel: true
Config/testthat/start-first: who_gs, ig_nbs, ig_fet, ig_png
Encoding: UTF-8
Language: en-GB
LazyData: true
RoxygenNote: 7.3.0
Roxygen: list(markdown = TRUE, roclets = c ("namespace", "rd", "srr::srr_stats_roclet"))

Scope

Pre-submission Inquiry

General Information

The target audience for this package is researchers, clinicians, and policy-makers interested in nutrition and fetal/newborn/child health. The package itself is used to convert measurements, for example a baby's weight at a given age, into summary statistics such as z-scores (i.e. number of standard deviations away from mean) and percentiles (i.e. number of percentage points above/below the median, expressed as a decimal). It can also be used to classify these z-scores and percentiles into specific categories for specific facets of growth. Scientific applications of this package would therefore include using our functions to generate statistical measures of growth in individuals or populations across time or pre/post a healthcare intervention. These could then be used in further downstream analyses.

Several R packages which implement child growth charts already exist, but they differ in the range of growth charts offered, their flexibility in conversion, and in what data they make available to users.

  1. anthro converts measurements into z-scores in the WHO Child Growth Standards, but lacks any INTERGROWTH-21st standards and outputs tabular data. We provide an interface which takes vectors in and gives vectors out, so is more flexible (e.g. with dplyr pipelines). This package is available on CRAN.
  2. childsds can convert measurements to z-scores or percentiles, but cannot convert z-scores/percentiles to expected measurements. Additionally, childsds does not contain the newborn/postnatal INTERGROWTH-21st growth standards, which we implement. Though childsds does include more growth references, growth references are not within the scope of the GIGS project. We can discuss the reasons for this if necessary. This package is available on CRAN.
  3. growthstandards contains functions for converting between values and z-scores/percentiles, as in gigs. It includes the INTERGROWTH-21st fetal standards, but not the newborn or postnatal standards we implement. This package makes coefficients available to end-users, but not reference growth curves. This package is not available on CRAN. It was last updated in January 2024.
  4. intergrowth provides more fetal growth standards than gigs, but cannot convert between z-scores/percentiles in the lacks the INTERGROWTH-21st newborn or postnatal growth standards, which we have implemented in gigs. This package also does not make coefficients for the growth standards available to end-users, though it it does provide growth curve data to end-users. This package is not available on CRAN, and was last updated in January 2023.
  5. gigs provides a simple interface for working with the growth standards it implements, which can be easily included in dplyr-like data wrangling pipelines. It implements all available WHO 2006/2007 and INTERGROWTH-21st growth standards, and makes published growth curves and model coefficients are available wherever possible. In our own testing, we found that it also warns end users about bad input data more comprehensively.

The Other packages section of the repository README also contains links to each of these packages, and a table describing features present in gigs compared to other growth standards packages.

We have a benchmarking vignette which shows the scaling of these packages when analysing datasets containing 1 to 100,000 cases. In summary: anthro scales the worst (29 ms to 2.24 seconds). The other packages are then clustered together: growthstandards is the fastest for 100,000 cases (4.62 ms to 125 ms); childsds is next (2.40 ms to 126 ms); then gigs (1.32 ms to 128 ms).

Not applicable.

Badging

Silver

Technical checks

Confirm each of the following by checking the box.

This package:

Publication options

Code of conduct

ropensci-review-bot commented 4 months ago

Thanks for submitting to rOpenSci, our editors and @ropensci-review-bot will reply soon. Type @ropensci-review-bot help for help.

ropensci-review-bot commented 4 months ago

:rocket:

Editor check started

:wave:

ropensci-review-bot commented 4 months ago

Checks for gigs (v0.4.1)

git hash: a9d9654a

Package License: GPL (>= 3)


1. rOpenSci Statistical Standards (srr package)

This package is in the following category:

:heavy_check_mark: All applicable standards [v0.2.0] have been documented in this package (632 complied with; 0 N/A standards)

Click to see the report of author-reported standards compliance of the package with links to associated lines of code, which can be re-generated locally by running the srr_report() function from within a local clone of the repository.


2. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate. |type |package | ncalls| |:----------|:-----------|------:| |internal |gigs | 401| |internal |base | 271| |imports |stats | 36| |imports |checkmate | 13| |imports |gamlss.dist | 1| |imports |vctrs | 1| |suggests |knitr | NA| |suggests |rmarkdown | NA| |suggests |testthat | NA| |suggests |units | NA| |suggests |withr | NA| |linking_to |NA | NA| Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats()', and examining the 'external_calls' table.

gigs

validate_ig_fet (22), validate_ig_nbs (17), fn_on_subset (13), validate_who_gs (11), who_gs_lms2value (9), validate_ig_png (6), gigs_xaz_lgls (5), validate_yzp (5), ig_fet_doppler_gms (3), ig_fet_efw_lms (3), ig_fet_gwg_mu_sigma (3), ig_fet_mu_sigma (3), ig_nbs_bodycomp_mu_sigma (3), ig_nbs_msnt (3), ig_nbs_wlr_mu_sigma (3), ig_png_equations (3), ig_vpns_equations (3), mu_sigma_z2y (3), validate_parameter_lengths (3), who_gs_lms (3), classify_sfga (2), gigs_laz (2), gigs_option_get (2), gigs_waz (2), gigs_wlz (2), ig_nbs_hcfga_value2zscore (2), ig_nbs_lfga_value2zscore (2), ig_nbs_wfga_value2centile (2), ig_nbs_wfga_value2zscore (2), ig_png_hcfa_value2zscore (2), ig_png_lfa_value2zscore (2), ig_png_wfa_value2zscore (2), ig_png_wfl_value2zscore (2), inrange (2), validate_hcaz_params (2), validate_laz_params (2), validate_waz_params (2), validate_wlz_params (2), who_gs_hcfa_value2zscore (2), who_gs_lhfa_value2zscore (2), who_gs_wfa_value2zscore (2), classify_stunting (1), classify_svn (1), classify_wasting (1), classify_wfa (1), drop_null_elements (1), exponent (1), gigs_hcaz (1), gigs_option_set (1), handle_invalid_chr_options (1), handle_missing_data (1), handle_oob_centiles (1), handle_oob_xvar (1), handle_undefined_data (1), handle_var (1), hcfa_mu (1), hcfa_sigma (1), hcfga_mu (1), ig_fet_acfga_centile2value (1), ig_fet_acfga_value2centile (1), ig_fet_acfga_value2zscore (1), ig_fet_acfga_zscore2value (1), ig_fet_avfga_centile2value (1), ig_fet_avfga_value2centile (1), ig_fet_avfga_value2zscore (1), ig_fet_avfga_zscore2value (1), ig_fet_bpdfga_centile2value (1), ig_fet_bpdfga_value2centile (1), ig_fet_bpdfga_value2zscore (1), ig_fet_bpdfga_zscore2value (1), ig_fet_centile2value (1), ig_fet_cmfga_centile2value (1), ig_fet_cmfga_value2centile (1), ig_fet_cmfga_value2zscore (1), ig_fet_cmfga_zscore2value (1), ig_fet_crlfga_centile2value (1), ig_fet_crlfga_value2centile (1), ig_fet_crlfga_value2zscore (1), ig_fet_crlfga_zscore2value (1), ig_fet_doppler_y2z (1), ig_fet_doppler_z2y (1), ig_fet_efw_y2z (1), ig_fet_efw_z2y (1), ig_fet_efwfga_centile2value (1), ig_fet_efwfga_value2centile (1), ig_fet_efwfga_value2zscore (1), ig_fet_efwfga_zscore2value (1), ig_fet_estimate_fetal_weight (1), ig_fet_estimate_ga (1), ig_fet_estimate_ga_crl (1), ig_fet_estimate_ga_hc (1), ig_fet_estimate_ga_hcfl (1), ig_fet_flfga_centile2value (1), ig_fet_flfga_value2centile (1), ig_fet_flfga_value2zscore (1), ig_fet_flfga_zscore2value (1), ig_fet_gafcrl_centile2value (1), ig_fet_gafcrl_value2centile (1), ig_fet_gafcrl_value2zscore (1), ig_fet_gafcrl_zscore2value (1), ig_fet_gaftcd_centile2value (1), ig_fet_gaftcd_value2centile (1), ig_fet_gaftcd_value2zscore (1), ig_fet_gaftcd_zscore2value (1), ig_fet_gwg_y2z (1), ig_fet_gwg_z2y (1), ig_fet_gwgfga_centile2value (1), ig_fet_gwgfga_value2centile (1), ig_fet_gwgfga_value2zscore (1), ig_fet_gwgfga_zscore2value (1), ig_fet_hcfga_centile2value (1), ig_fet_hcfga_value2centile (1), ig_fet_hcfga_value2zscore (1), ig_fet_hcfga_zscore2value (1), ig_fet_mu_sigma_y2z (1), ig_fet_mu_sigma_z2y (1), ig_fet_ofdfga_centile2value (1), ig_fet_ofdfga_value2centile (1), ig_fet_ofdfga_value2zscore (1), ig_fet_ofdfga_zscore2value (1), ig_fet_pifga_centile2value (1), ig_fet_pifga_value2centile (1), ig_fet_pifga_value2zscore (1), ig_fet_pifga_zscore2value (1), ig_fet_poffga_centile2value (1), ig_fet_poffga_value2centile (1), ig_fet_poffga_value2zscore (1), ig_fet_poffga_zscore2value (1), ig_fet_pvfga_centile2value (1), ig_fet_pvfga_value2centile (1), ig_fet_pvfga_value2zscore (1), ig_fet_pvfga_zscore2value (1), ig_fet_rifga_centile2value (1), ig_fet_rifga_value2centile (1), ig_fet_rifga_value2zscore (1), ig_fet_rifga_zscore2value (1), ig_fet_sdrfga_centile2value (1), ig_fet_sdrfga_value2centile (1), ig_fet_sdrfga_value2zscore (1), ig_fet_sdrfga_zscore2value (1), ig_fet_sffga_centile2value (1), ig_fet_sffga_value2centile (1), ig_fet_sffga_value2zscore (1), ig_fet_sffga_zscore2value (1), ig_fet_sfhfga_centile2value (1), ig_fet_sfhfga_value2centile (1), ig_fet_sfhfga_value2zscore (1), ig_fet_sfhfga_zscore2value (1), ig_fet_tcdfga_centile2value (1), ig_fet_tcdfga_value2centile (1), ig_fet_tcdfga_value2zscore (1), ig_fet_tcdfga_zscore2value (1), ig_fet_v2z_internal (1), ig_fet_value2centile (1), ig_fet_value2zscore (1), ig_fet_z2v_internal (1), ig_fet_zscore2value (1), ig_nbs_bfpfga_centile2value (1), ig_nbs_bfpfga_value2centile (1), ig_nbs_bfpfga_value2zscore (1), ig_nbs_bfpfga_zscore2value (1), ig_nbs_bodycomp_p2v (1), ig_nbs_bodycomp_v2p (1), ig_nbs_c2v_internal (1), ig_nbs_centile2value (1), ig_nbs_ffmfga_centile2value (1), ig_nbs_ffmfga_value2centile (1), ig_nbs_ffmfga_value2zscore (1), ig_nbs_ffmfga_zscore2value (1), ig_nbs_fmfga_centile2value (1), ig_nbs_fmfga_value2centile (1), ig_nbs_fmfga_value2zscore (1), ig_nbs_fmfga_zscore2value (1), ig_nbs_hcfga_centile2value (1), ig_nbs_hcfga_value2centile (1), ig_nbs_hcfga_zscore2value (1), ig_nbs_lfga_centile2value (1), ig_nbs_lfga_value2centile (1), ig_nbs_lfga_zscore2value (1), ig_nbs_msnt_p2v (1), ig_nbs_msnt_v2p (1), ig_nbs_v2c_internal (1), ig_nbs_value2centile (1), ig_nbs_value2zscore (1), ig_nbs_wfga_centile2value (1), ig_nbs_wfga_zscore2value (1), ig_nbs_wlrfga_centile2value (1), ig_nbs_wlrfga_p2v (1), ig_nbs_wlrfga_v2p (1), ig_nbs_wlrfga_value2centile (1), ig_nbs_wlrfga_value2zscore (1), ig_nbs_wlrfga_zscore2value (1), ig_nbs_zscore2value (1), ig_png_centile2value (1), ig_png_hcfa_centile2value (1), ig_png_hcfa_value2centile (1), ig_png_hcfa_zscore2value (1), ig_png_lfa_centile2value (1), ig_png_lfa_value2centile (1), ig_png_lfa_zscore2value (1), ig_png_v2z_internal (1), ig_png_value2centile (1), ig_png_value2zscore (1), ig_png_wfa_centile2value (1), ig_png_wfa_value2centile (1), ig_png_wfa_zscore2value (1), ig_png_wfl_centile2value (1), ig_png_wfl_value2centile (1), ig_png_wfl_zscore2value (1), ig_png_z2v_internal (1), ig_png_zscore2value (1), ig_vpns_value2zscore (1), ig_vpns_zscore2value (1), lfa_log_mu (1), lfa_sigma (1), lfga_mu (1), msg_invalid_sex_acronym (1), msg_missing_data (1), msg_oob_centiles (1), msg_oob_xvar (1), msg_undefined_data (1), mu_sigma_y2z (1), remove_attributes (1), retrieve_coefficients (1), validate_acronym (1), validate_chr (1), validate_ig_fet_estimation_param (1), validate_ig_fet_weight_estimation_param (1), validate_numeric (1), validate_sex (1), validate_xvar (1), wfa_log_mu (1), wfa_sigma (1), wfga_logmu (1), wfl_mu (1), wfl_sigma (1), who_gs_acfa_centile2value (1), who_gs_acfa_value2centile (1), who_gs_acfa_value2zscore (1), who_gs_acfa_zscore2value (1), who_gs_bfa_centile2value (1), who_gs_bfa_value2centile (1), who_gs_bfa_value2zscore (1), who_gs_bfa_zscore2value (1), who_gs_centile2value (1), who_gs_hcfa_centile2value (1), who_gs_hcfa_value2centile (1), who_gs_hcfa_zscore2value (1), who_gs_lhfa_centile2value (1), who_gs_lhfa_value2centile (1), who_gs_lhfa_zscore2value (1), who_gs_lms_v2z (1), who_gs_lms_v2z_constrained (1), who_gs_lms_v2z_over_three (1), who_gs_lms_v2z_under_minus_three (1), who_gs_lms_z2v (1), who_gs_lms_z2v_over_three (1), who_gs_lms_z2v_under_minus_three (1), who_gs_ssfa_centile2value (1), who_gs_ssfa_value2centile (1), who_gs_ssfa_value2zscore (1), who_gs_ssfa_zscore2value (1), who_gs_tsfa_centile2value (1), who_gs_tsfa_value2centile (1), who_gs_tsfa_value2zscore (1), who_gs_tsfa_zscore2value (1), who_gs_v2z_internal (1), who_gs_value2centile (1), who_gs_value2zscore (1), who_gs_wfa_centile2value (1), who_gs_wfa_value2centile (1), who_gs_wfa_zscore2value (1), who_gs_wfh_centile2value (1), who_gs_wfh_value2centile (1), who_gs_wfh_value2zscore (1), who_gs_wfl_value2zscore (1)

base

list (63), length (32), is.null (18), c (15), rep (12), log (9), is.na (8), names (8), for (7), ifelse (6), gamma (5), lengths (5), sqrt (5), data.frame (4), logical (4), matrix (4), paste0 (4), unique (4), abs (3), character (3), get (3), if (3), lapply (3), ncol (3), nrow (3), numeric (3), vapply (3), as.data.frame (2), levels (2), options (2), parent.frame (2), rep_len (2), sum (2), with (2), deparse (1), emptyenv (1), exp (1), inherits (1), max (1), mode (1), new.env (1), paste (1), q (1), range (1), rep.int (1), replace (1), seq_along (1), sign (1), substitute (1), unlist (1), vector (1)

stats

sigma (28), complete.cases (4), var (2), approx (1), qnorm (1)

checkmate

qassert (8), assert_numeric (2), assert_subset (2), assert_character (1)

gamlss.dist

pST3C (1)

vctrs

vec_recycle_common (1)


3. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has: - code in R (100% in 15 files) and - 1 authors - 3 vignettes - 7 internal data files - 4 imported packages - 185 exported functions (median 6 lines of code) - 376 non-exported functions in R (median 8 lines of code) --- Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used: - `loc` = "Lines of Code" - `fn` = "function" - `exp`/`not_exp` = exported / not exported All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by [the `checks_to_markdown()` function](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) The final measure (`fn_call_network_size`) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile. |measure | value| percentile|noteworthy | |:------------------------|-------:|----------:|:----------| |files_R | 15| 73.0| | |files_vignettes | 3| 92.4| | |files_tests | 10| 90.7| | |loc_R | 2689| 89.0| | |loc_vignettes | 877| 89.0| | |loc_tests | 4157| 97.6|TRUE | |num_vignettes | 3| 94.2| | |data_size_total | 1093128| 95.5|TRUE | |data_size_median | 11317| 79.8| | |n_fns_r | 561| 98.0|TRUE | |n_fns_r_exported | 185| 98.3|TRUE | |n_fns_r_not_exported | 376| 97.5|TRUE | |n_fns_per_file_r | 21| 95.9|TRUE | |num_params_per_fn | 3| 33.6| | |loc_per_fn_r | 6| 12.1| | |loc_per_fn_r_exp | 6| 10.5| | |loc_per_fn_r_not_exp | 8| 22.6| | |rel_whitespace_R | 13| 82.6| | |rel_whitespace_vignettes | 13| 67.8| | |rel_whitespace_tests | 12| 94.8| | |doclines_per_fn_exp | 163| 97.4|TRUE | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 408| 94.2| | ---

3a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


4. goodpractice and other checks

Details of goodpractice checks (click to open)

#### 3a. Continuous Integration Badges [![R-CMD-check.yaml](https://github.com/lshtm-gigs/gigs/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/lshtm-gigs/gigs/actions) [![pkgcheck](https://github.com/lshtm-gigs/gigs/workflows/pkgcheck/badge.svg)](https://github.com/lshtm-gigs/gigs/actions) [![test-coverage.yaml](https://github.com/lshtm-gigs/gigs/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/lshtm-gigs/gigs/actions) **GitHub Workflow Results** | id|name |conclusion |sha | run_number|date | |----------:|:--------------------------|:----------|:------|----------:|:----------| | 7815041175|pages build and deployment |success |ea59a9 | 20|2024-02-07 | | 7815003364|pkgcheck |success |a9d965 | 5|2024-02-07 | | 7815003368|pkgdown |success |a9d965 | 45|2024-02-07 | | 7814822521|R-CMD-check |success |a9d965 | 51|2024-02-07 | | 7814822525|test-coverage |success |a9d965 | 51|2024-02-07 | | 7815003373|Update CITATION.cff |success |a9d965 | 2|2024-02-07 | --- #### 3b. `goodpractice` results #### `R CMD check` with [rcmdcheck](https://r-lib.github.io/rcmdcheck/) rcmdcheck found no errors, warnings, or notes #### Test coverage with [covr](https://covr.r-lib.org/) Package coverage: 100 #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) No functions have cyclocomplexity >= 15 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found the following 69 potential issues: message | number of times --- | --- Avoid library() and require() calls in packages | 2 Lines should not be more than 80 characters. | 67


Package Versions

|package |version | |:--------|:---------| |pkgstats |0.1.3.9 | |pkgcheck |0.1.2.14 | |srr |0.0.1.194 |


Editor-in-Chief Instructions:

This package is in top shape and may be passed on to a handling editor

ldecicco-USGS commented 4 months ago

@ropensci-review-bot check srr

ropensci-review-bot commented 4 months ago

'srr' standards compliance:

:heavy_check_mark: This package complies with > 50% of all standads and may be submitted.

rkillick commented 4 months ago

@ropensci-review-bot assign @rkillick as editor

ropensci-review-bot commented 4 months ago

Assigned! @rkillick is now the editor

simpar1471 commented 3 months ago

Hi @rkillick, have you had any chance to look at this? Not meaning to be pushy if you're rained in with other things at the moment!