growthcleanr 3.0.0 is a major update addressing usability, cleaning
performance, customization, efficiency, and documentation. This
changelog lists key changes. If you used an earlier version, start with
vignette("experienced-start-here"), which explains how to
update 2.2.3 code and describes all of these changes in more detail. For
full documentation of current behavior, see the package vignettes
(browseVignettes("growthcleanr")) and growthcleanr.org.
growthcleanr_app(). The app walks you through loading a
data file, mapping your columns, and running growthcleanr, and lets you
save the results. It runs entirely on your own computer; no data are
uploaded. See the Shiny app
how-to guide.cleangrowth() accepts a data
frame, with the option to use alternate column names. Data can be in one
of three formats: long (one measurement per row), semi-wide (one visit
per row), or wide (one subject per row). Users may enter date of birth
and visit date rather than agedays. An optional
id column makes results fully replicable. The Shiny app
also handles these formats and dates. For ready-to-run scripts, see
vignette("example-scripts"); for full detail, see “Input
format: long, semi-wide, and wide” and “Date parsing” in
vignette("wrapper").cleangrowth() returns your
data with results added. New outputs include redesigned exclusion codes
and bin_exclude, unit_error_range, and
mean_ht columns.parallel = TRUE).
gc_partial_run() re-cleans only subjects whose data
changed.gc_runtrial() runs
growthcleanr on a sample of your data and reports how your columns, sex
coding, and parameters were read, so you can check your setup before a
full run.vignette("example-scripts")), and expanded technical
documentation.Code written for 2.2.3 will need to be updated. We apologize for any
inconvenience this causes to experienced users but hope these changes
make growthcleanr easier for most users. Details and replacement code
are in “Updating code written for growthcleanr 2.2.3” in
vignette("experienced-start-here").
cleangrowth() takes a data frame as its first argument
and returns a data.table, not a vector of exclusion codes. The content
of the old vector is now in the exclude column. Old calls
with unnamed arguments stop with a message, but code that names its
arguments and treats the result as a vector can run without an error and
give wrong results.vignette("experienced-start-here").cf_rescue argument.
testacf() and acf_answers() were removed, and
adjustcarryforward() now only stops with a message. See
vignette("cf-rescue").num.batches is now cores, and
weight_cap in kg is now adult_scale_max_lbs in
pounds. See “Removed and renamed arguments” in
vignette("experienced-start-here").sd.recenter argument still allows users to enter
their own recentering table. With the default,
sd.recenter = NA, growthcleanr now uses a built-in
recentering table based on clinical data. The "nhanes" and
"derive" options and sd_median() were removed.
See vignette("recentering").splitinput() was removed; checkpointing replaces it.
See vignette("large-datasets").gc_cli_path()) and accepts only long flags. See
vignette("command-line").ext_bmiz() output keeps your column names, and
longwide() arguments changed. To avoid errors related to
numeric sex coding, longwide() now returns sex as M or F,
not numeric sex, so filters of longwide() output on
sex == 1 or sex == 2 will match no rows,
without a warning. ext_bmiz() now stops on numeric sex
unless sex has both 1s and 2s and no other values. See
vignette("utilities").cleangrowth(), longwide(), and
ext_bmiz() and a recode_sex() fix, are in
“Other changes” in vignette("experienced-start-here")..data$ pronoun
notation for CRAN compatibility with recent dplyr versions, resolving
“no visible binding for global variable” notesrlang dependency for .data
pronoun supportid
variable in data.table operationsext_bmiz() to match Dec 2022 NCHS guidelines
(#98)longwide() (#71)cleangrowth() output factor now
enumerateddonttest,
added CRAN comments file, updated .Rbuildignore (#84)inst/extdata for size requirements;
added R.utils as import to support fread() for
.gz filesadult_cutpoint and weightcap options
(https://github.com/growth-data-tools/growthcleanr/issues/17,
others)longwide(), added
simple_bmi() (#47)gcdriver.R to support adult options, parallel
operation
(https://github.com/growth-data-tools/growthcleanr/pull/23)syngrowth synthetic test data, now includes
adults (#50)CHECK cleanly (#18,
#60)Hmisc dependency (#36)clean_value result column name in docs with
gcr_result for clarity (#35)inst/extdata/nhanes-reference-medians.csv,
reference medians for recentering derived from NHANES (described in
README)sd.recenter option to include new
NHANES reference medians and explicit specification with “NHANES” or
“derive” (https://github.com/growth-data-tools/growthcleanr/pull/9)README.md to be generated from
README.Rmd w/knitr (thanks
file.path() more consistently in
R/growth.RMinor update to WHO HT velocity 3SD files to correct a small number of errors (#24). Affected files were:
inst/extdata/who_ht_maxvel_3sd.csvinst/extdata/who_ht_vel_3sd.csvAlthough these changes were very minor, it is possible that results on data cleaned after this change may vary from previous results. The prior version of these files may be obtained by visiting the tagged release version 1.2.3 at https://github.com/growth-data-tools/growthcleanr/releases/tag/1.2.3.
The released version of growthcleanr available at that
link contains the older version of both files; that older version may be
used to verify reproducibility.
Alternatively, a more recent version of growthcleanr may
be used with only the affected files replaced with their older versions
available at the 1.2.3 tag link above. This must be done
manually.
citation("growthcleanr") works as
expected@import now preferred over library() for
library loadingfdir option to splitinput() to
specify split file directorysyngrowth) to
improve compressiontests/testthat/test-utils.R and
tests/testthat/test-cdc.R to support newly added
functionslongwide(); fixed missing
import in DESCRIPTIONext_bmiz(), comparable
to SAS program published at
https://www.cdc.gov/growth-chart-training/hcp/computer-programs/sas.htmlinst/extdata/CDCref_d.csv from CDC
for use with ext_bmiz()longwide() for transforming
cleangrowth() output for use with
ext_bmiz()recode_sex() for recoding input data
column values for sex to match cleangrowth()
or ext_bmiz() requirementsexec/gcdriver.R command-line script for CLI
execution of cleangrowth()Dockerfile (and .dockerignore)
enabling containerized use of growthcleanrtestsadjustcarryforward() in
R/adjustcarryforward.R and driver script
exec/testadjustcf.R (see README-adjustcarryforward.md for
details)R/growth.R into separate files
for clarity and easier maintenance (all utility functions not directly
used by cleangrowth() are now in
R/utils.R)error.load.mincount and
error.load.thresholdlt3.exclude.mode with default (same as before) and
flag.both mode for handling unmatched pairssdmedian.filename and
sdrecentered.filenamesplitinput() functionsyngrowth loads
automatically.