Changelog
Source:NEWS.md
actimetrics 0.10.0
Internal
- Imports
actireadwithexcept = "tzoffset_to_tz", soactibasecan exporttzoffset_to_tz()later without an import conflict. -
GGIRis no longer listed inSuggests; it was not used. - Checks for
agcountsandstepcountnow userequireNamespace(pkg, partial = TRUE)instead ofrlang::check_installed()/rlang::is_installed(), so their.onLoadhooks (which initialize Python viareticulate) do not run during the check. This fixes the CRAN NOTE in “checking dependencies in R code”.
New features
- New sleep-period-time guiders following the GGIR sleep definitions (implemented without calling GGIR):
acti_sleep_hdcza(),acti_sleep_hlrb(),acti_sleep_horangle(),acti_sleep_l5(),acti_sleep_notworn(),acti_sleep_setwindow(), andacti_sleep_diary(), dispatched byacti_sleep_guider()(seeacti_sleep_guider_requirements()).acti_sleep_sib()detects sustained inactivity bouts,acti_sleep_label()andacti_sleep_labels()turn guiders into epoch-level sleep/wake labels,acti_sleep_fuse_labels()combines labels with STAPLE, andacti_sleep_ensemble()runs the whole pipeline from raw or epoch data. - New activity-intensity classifiers:
acti_threshold_counts()andacti_threshold_enmo()for user-supplied cut-points, and published cut-points inacti_threshold_montoye(),acti_threshold_sasaki(),acti_threshold_romanzini(), andacti_threshold_hildebrand()(withacti_threshold_hildebrand_wrist()andacti_threshold_hildebrand_hip()). - New
acti_calculate_wear_raw()estimates non-wear from raw tri-axial acceleration, implemented without calling GGIR or actipy. Likeacti_calculate_wear(), it takes amethodargument and passes...to the method function:-
acti_calculate_wear_raw_ggir()(method = "ggir", default): the GGIR non-wear and clipping algorithm (van Hees et al. 2011, 2013), exposing GGIR’s settings: the medium/long window sizes, the"2023"and"2013"approaches, the standard-deviation and range thresholds, the clipping threshold or dynamic range, edge correction, and the night-time short non-wear filter. -
acti_calculate_wear_raw_actipy()(method = "actipy"): stationary episodes of Doherty et al. (2017), as in actipy’sdetect_nonwear(), with the window, patience, and standard-deviation threshold exposed.
acti_calculate_wear()remains the count-based (Choi/Troiano) method. -
Bug fixes and other changes
acti_process()frees the raw data once counts are calculated, before non-wear detection and day inclusion.acti_calculate_stepcount()(andpy_acti_calculate_stepcount()) now return times in the input’s time zone.stepcountreports local clock times without a time zone, which were previously labelled UTC, shifting steps by the input’s UTC offset (e.g. one hour for British Summer Time). A newtzargument sets the time zone, which is needed for file input (default"UTC").epoch/unitarguments are standardized withactibase::acti_standardize_epoch(), soacti_calculate_counts()acceptsepoch = "1 min"and the measure functions accept numeric seconds or strings such as"30s".ensure_all_time = TRUEno longer errors for units such as"5 seconds"or"1 minute", andacti_calculate_mims()no longer errors for units without a space such as"1min".acti_calculate_ai()andacti_calculate_mad()now default toverbose = TRUE.acti_apply_cole_kripke(),acti_apply_sadeh(), andacti_apply_tudor_locke()no longer add a superfluousvector.magnitudecolumn (a copy ofcounts) to their output.acti_apply_cole_kripke()andacti_apply_sadeh()no longer return thecountcolumn thatactigraph.sleepruses internally for scoring (axis1truncated and, for Cole-Kripke, divided by 100). It overwrote anycountcolumn in the input, which is now kept.
actimetrics 0.9.0
CRAN release: 2026-10-20
- Works with both actibase 0.6.0 and 0.8.0:
acti_calculate_measures()usesacti_flag_qc_all()when actibase provides it andflag_qc_all()otherwise, since actibase 0.8.0 renames it.
Breaking changes
-
acti_process()andacti_process_study()now aim to match ActiLife for GT3X data: files are read withdigits = 8(unlessdigitsis given), resampled to 30Hz, then rounded to 3 digits half away from zero, as ActiLife does. Previously the data were read at 5 digits and not rounded, giving counts that differed from ActiLife by 1-3 in many epochs. Rounding 5-digit data is not a fix: it rounds twice and differs from ActiLife more often. Counts from GT3X files will change slightly.
New features
-
acti_calculate_counts()andacti_process()gainround_digitsto roundX/Y/Zhalf away from zero (baseround()rounds0.0625to0.062) after resampling and before counting. Inacti_process(), the defaultNULLuses 3 for GT3X data and no rounding otherwise;NAturns it off.
actimetrics 0.8.0
Breaking changes
-
acti_apply_cole_kripke(),acti_apply_sadeh(), andacti_calculate_wear(use_magnitude = FALSE)now error ifaxis1is missing. Both sleep algorithms score the vertical axis, so vector-magnitude counts are no longer silently converted withaxis1 = VM / sqrt(3). -
acti_calculate_wear()errors with an informative message unless the data are 60-second epochs (required by Choi and Troiano). - Step summaries (
acti_calculate_stepcount(),acti_calculate_verisense(),acti_calculate_forest(),acti_calculate_sdt()) now returnNAfor epochs where all values are missing (e.g. non-wear) rather than 0 steps;walkingfromacti_calculate_stepcount()is likewiseNA. - With
allow_truncation = TRUE,acti_calculate_auc()andacti_calculate_fast_mims()mark an epoch with any out-of-range axis as-0.01(all axes and the total), asMIMSunitdoes, rather than adding the-1sentinel into the total.
New features
- New
acti_process_study()processes every supported raw file (GT3X, CWA, GENEActiv BIN, CSV) in a directory withacti_process()and saves RDS files. Failures are always reported with a warning and listed in thefailedattribute of the result. CSV files are read withreadr, which is now in Imports. -
acti_apply_tudor_locke()gainssleep_colto use a sleep-state column with another name (e.g. fromacti_apply_tudor_locke_diary()). -
acti_calculate_ai()has its own documentation page describing the (noise-unadjusted) Activity Index of Bai et al. (2016).
Bug fixes
-
acti_calculate_counts()subsets totime/X/Y/Zbefore callingagcounts, whose start-of-record padding failed on data with extra columns (e.g. GENEActivlight/temperature). - The first-second padding before
agcountskeeps all columns, attributes, and the timezone, builds the padded times on an exact sample grid, and no longer re-prefixes the existing transformation history. It is kept by default alongside the upstream fix (bhelsel/agcounts#51), as it also avoids agcounts’ duplicate zero-count rows and works with olderagcounts. -
acti_calculate_wear()now passes...toactigraph.sleepr(arguments such asmin_period_lenwere ignored) and is not affected by existingwearcolumns. -
mims_default_extrapolation(),mims_default_interpolation(), andmims_default_filtering()now record their transformations. -
acti_calculate_ai()skips 1-second windows with a single sample instead of making the whole epochNA, and warns for data sampled under 2 Hz. -
acti_calculate_verisense()validatesmethodwithmatch.arg(), so the default is"original". -
acti_calculate_fast_mims()uses the sample rate of the processed (100 Hz) data; a suppliedsample_rateis ignored with a warning. - A user-supplied
sample_rateinacti_calculate_measures()is now passed through to the activity-count calculation, and a missing sample rate gives an informative error fromacti_calculate_counts(resample = FALSE). - Epoch/unit strings such as
"30s"and"1min"are parsed withlubridate, consistent withlubridate::floor_date(). -
py_acti_calculate_stepcount()andpy_acti_calculate_forest()return their result visibly. - Fixed the
aggregated_at_transformation label and documentation ofverboseandlfe_select.
actimetrics 0.7.0
Add sleep diary labeling for Tudor–Locke and adapt diary labels for
actigraph.sleepr::apply_tudor_locke().Declare
actigraph.sleepras an installation dependency for sleep wrappers.Fixing bug with
acti_calculate_mimsdue to not subsettingXYZ.
actimetrics 0.6.0
- Fixing
agcountsbug from https://github.com/bhelsel/agcounts/issues/50.