Date: 2026-11-10
include_mean_hrate parameter
(default FALSE) on compute_fitbit_activity_table() and
compute_fitbit_activity_table_ext(). When enabled,
compute_fitbit_mean_hrate_scores() computes
hrate_mean (mean heart rate after exclusions) and
hrate_mean_actv (mean heart rate over non-sleep minutes) at
the requested bin_minutes grouping (daily by default), and
these are aggregated into the weekly summaries as
mean_hrate and mean_hrate_actv via
summarize_activity()/
compute_fitbit_activity_week().compute_fitbit_sleep_table() and
compute_fitbit_sleep_table_ext() to exclude non-session
sleep data.data_daily column-name check
(chk::check_names()) is only performed when
data_daily is supplied. Previously it ran unconditionally
and would fail when data_daily was NULL, even
though that argument is optional.compute_fitbit_weekly_summary() to coerce
wk_type to a factor via an explicit
mutate(wk_type = as.factor(wk_type)).summarize_sleep() to rename weekly sleep-stage
summary columns to a consistent mean_min_<stage>_slp
form (mean_min_restless_slp,
mean_min_light_slp, mean_min_deep_slp,
mean_min_rem_slp), replacing the previous inconsistent
names (mean_min_restless, mean_min_slp_light,
mean_min_slp_deep, mean_min_slp_rem); the
underlying calculations are unchanged.flag_implausible_sleep() to return distinct
participant/timestamp rows of sleep periods flagged with implausible
structure, rather than one row per flagged epoch.compute_fitbit_intensity_scores() to floor METs
values below 10 (1.0) to 10.summarize_activity() and summarize_sleep();
mean aggregations remain.compute_fitbit_activity_week() and
compute_fitbit_sleep_week() to evaluate
filter_expr, including its default, within df.
Previously both failed with an “object not found” error (e.g.,
object 'qc_600min' not found) unless
filter_expr was a constant.compute_fitbit_sleep_week() to select the columns
that summarize_sleep() returns: the renamed
mean_min_<stage>_slp columns and the
duration-weighted heart rate means mean_hrate_awake_slp,
mean_hrate_restless_slp,
mean_hrate_asleep_slp, mean_hrate_light_slp,
mean_hrate_deep_slp, and mean_hrate_rem_slp.
Previously the function failed with “Can’t select columns that don’t
exist”.compute_mh_y_bisbas__bis_sum() to reverse code
mh_y_bisbas__bis_005 (0-3 becomes 3-0) before summing, as
the BIS scale requires. Previously the item was summed as is, so BIS sum
scores now differ from those computed with 7.0.x wherever this item was
answered.Date: 2026-08-19
inst/CITATION, the package startup message, the
package-level documentation, and the README.Date: 2026-07-09
ss_* utility functions (ss_mean(),
ss_sum(), ss_count(), ss_max(),
ss_count_cond(), ss_mean_pos()) now convert
non-finite values (Inf, -Inf,
NaN) to NA after coercing the input columns to
numeric and before summarization, so they are treated like any other
missing value. This includes character values such as "Inf"
that only become non-finite through the coercion. ss_nm(),
which does not coerce its inputs, applies the conversion to numeric
columns only.ss_* utility functions now
raises an informative warning when values that cannot be interpreted as
numbers (e.g., "abc") are set to NA, naming
the affected column and the number of values lost, instead of R’s bare
“NAs introduced by coercion” warning.ss_* utility functions now abort when the requested
score column name already exists in the input data, instead
of silently producing a duplicated column name.
ss_count_cond(combine = TRUE) now returns a tibble instead
of a base data frame, and ss_tscore() and
combine_checkboxes() gained additional input
validation.ss_* utility functions and the one-to-many compute
functions behind the TLFB, SUI, SDSU, medication (rx), and
family history scores, with hand-derived expected values for
non-response code exclusion, missingness thresholds, event filtering,
and return types. Each applicable function carries a regression case for
the v6.1.0 factor-to-numeric coercion bug (factor codes silently
converted to level indices).compute_tlfb_maxdose() now takes the maximum over
per-day summed doses instead of individual substance rows, and
compute_tlfb_totdose_sum() accumulates in chronological
session order instead of input row order. Combined-substance
maximum-dose scores and cumulative total-dose scores computed on
unsorted data change accordingly.ses-06M to
ses-07A) instead of the already elapsed one, and
compute_ss_use_onset_event() accepts character
session_id columns (previously it required factors and
errored otherwise).compute_ss_use_onset_age() roxygen now documents the
returned onset-age column as numeric (it was described as character),
and compute_famhx_endorsement() now renders its intended
error message when no columns match var_matches (a
variable-name typo previously surfaced as a cli interpolation error
instead).compute_ph_y_meds_estuse_flags_all() now flags youth
medications correctly. The internal estimated-use engine matched
category columns with a hardcoded ph_p_meds__ prefix, so
every ph_y_meds estimated-use flag was returned as
"0" regardless of the reported medications. The candidate
columns are now derived from each flag’s table_name
(ph_p_meds results are unchanged).Date: 2026-05-13
mh_p_ksads,
mh_y_ksads, su_p_ksads,
su_y_ksads).mh_p_famhx).ph_p_meds,
ph_y_meds, ph_p_dhx).su_y_dyn, su_y_stc,
su_y_tlfb).mh_y_pps, mh_y_ppsss).fc_y_lone).ph_p_anthr, ph_p_dhx).fc_y_na, ab_p_demo__ntvam).Family History (FAMHX) summary scores,
Medication use and history,
Static and Dynamic Substance Use (SDSU) summary scores, and
Computing Daily and Weekly Fitbit Scores.max_na) from
mh_p_ple_count and mh_y_ple_count, so scores
are now computed regardless of the number of missing items.mh_y_ysr scoring, where three obsolete variables
were still included and the missingness thresholds used outdated
criteria. The total score now uses 102 items with a maximum of 5 missing
items, subscales use the updated 20% missing-item threshold, and T-score
functions apply the same validation logic before returning a score.mh_y_peq, fc_y_fes,
fc_y_vs, fc_y_pnh, fc_y_psb, and
fc_y_srpf; values of 777 and 999 are now excluded from
fc_p_fes, fc_p_vs, and fc_p_psb;
unnecessary exclusion criteria were removed from
fc_y_vs__famil scores.compute_ph_y_mctq__sd_count school-data handling
to replace NAs with 0 when no school/work days endorsed and
numeric.recode_levels() calls could alter values before computing
means. The unwanted recoding step was removed.mh_y_ple, mh_p_ple).Date: 2025-11-30
ss_sum, ss_mean, ss_max,
ss_count_cond, ss_mean_pos. Fix: If input
columns are factors, coerce them to numeric (factor -> character
-> numeric) prior to computing the summary statistic. Previously, the
coercion was inaccurate (factor -> numeric), converting the levels to
numbers and not the displayed labels. For example, non-responses such as
777 (displayed label) could be level 6 for a factor / ordinal column.
NOTE: This bug did not affect computed summary scores in 6.0.compute_ph_y_mctq__fd__sleep__mid
24h and 36h where incorrectly usedph_y_mctq__sd__sleep_dur
than ph_y_mctq__sd__sleep_period.compute_ph_y_mctq__fd__sleep__mid
24h and 36h where incorrectly used ph_y_mctq__fd__sleep_dur
than ph_y_mctq__fd__sleep_period.ph_y_mctq__sleep_loss where
incorrectly used ph_y_mctq__*__sleep_dur than
ph_y_mctq__*__sleep_period.compute_ph_y_mctq__sd_count to handle missing
variables. ph_y_mctq__school_001__v01 and
ph_y_mctq__school_001__01__v1 were required by the function
but not available before 7.0.0. Now, before package version 7.0.0, if
these variables are missing, the function will create them internally
and fill them with NA values. After 7.0.0, these variables
are expected to be present.Date: 2025-08-21
ph_ph_sds (Sleep Disturbance Scale) scores.Date: 2025-06-27
The initial release of the ABCDscores package. This version is accompanied with the ABCD 6.0 data release.