Skip to content

stepmetrics

1.0.3Package record

Calculate Step and Cadence Metrics from Wearable Data

0packages depend
1.9Kdownloads / year
95.9%test coverage
11/13flavors OK

Overview

About
Maintained by Jairo H MiguelesCRAN page ↗GitHub ↗Issues ↗Declared funders: University of Alabama and Elroy J Aguiar

Provides functions to calculate step- and cadence-based metrics from timestamped accelerometer and wearable device data. Supports CSV and AGD files from 'ActiGraph' devices, CSV files from 'Fitbit' devices, and step counts derived with R package 'GGIR' https://github.com/wadpac/GGIR, with automatic handling of epoch lengths from 1 to 60 seconds. Metrics include total steps, cadence peaks, minutes and steps in predefined cadence bands, and time and steps in moderate-to-vigorous physical activity (MVPA). Methods and thresholds are informed by the literature, e.g., Tudor-Locke and Rowe (2012) doi:10.2165/11599170-000000000-00000, Barreira et al. (2012) doi:10.1249/MSS.0b013e318254f2a3, and Tudor-Locke et al. (2018) doi:10.1136/bjsports-2017-097628. The package record is also available on Zenodo (2023) doi:10.5281/zenodo.7858094.

Changes in 1.0.3
  • Tests: hardened timestamp checks to be robust across platforms (Windows, macOS ARM, Linux). Added cross-platform ISO-8601 parser that correctly handles Z and hh:mm offsets.
  • CI: added macOS ARM (Apple Silicon) checks via R-hub v2 to reproduce CRAN’s environment.

From NEWS.md in the release

Install

Health

CRAN checks
2ERROR11OK
Check messages
ERRORtestsr-devel-windows-x86_64, r-release-windows-x86_64

r-devel-windows-x86_64

Running 'spelling.R' [0s]
  Running 'testthat.R' [11s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(stepmetrics)
  > 
  > test_check("stepmetrics")
  Saving _problems/test-readFile-103.R
  
  ________________________________________________________________________________
  Calculating features per day...
  Processing participant: S001 
  ________________________________________________________________________________
  Calculating means per recording
  Processing participant: S001  
  ________________________________________________________________________________
  Storing output...
  
  

...[truncated]...
  ________________________________________________________________________________
  Calculating features per day...
  Processing participant: 101 
  ________________________________________________________________________________
  Calculating means per recording
  Processing participant: 101  
  ________________________________________________________________________________
  Storing output...
  
  
  Analyses complete!
  
          Your output is stored here:  D:\temp\2026_10_25_01_50_00_21025\Rtmp4cqwv7\stepmetrics_out_17a343082244 
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 67 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-readFile.R:103:3'): reads and formats data correctly ─────────
  Expected `unclass(as.POSIXct(ts, tz = "UTC"))` to be identical to `unclass(exp)`.
  Differences:
    `actual`: 1625312880.0
  `expected`: 1625320080.0
  
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 67 ]
  Error:
  ! Test failures.
  Execution halted

r-release-windows-x86_64

Running 'spelling.R' [0s]
  Running 'testthat.R' [12s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(stepmetrics)
  > 
  > test_check("stepmetrics")
  Saving _problems/test-readFile-103.R
  
  ________________________________________________________________________________
  Calculating features per day...
  Processing participant: S001 
  ________________________________________________________________________________
  Calculating means per recording
  Processing participant: S001  
  ________________________________________________________________________________
  Storing output...
  
  

...[truncated]...

  ________________________________________________________________________________
  Calculating features per day...
  Processing participant: 101 
  ________________________________________________________________________________
  Calculating means per recording
  Processing participant: 101  
  ________________________________________________________________________________
  Storing output...
  
  
  Analyses complete!
  
          Your output is stored here:  D:\temp\2026_10_21_01_50_00_6553\RtmpAr9ieY\stepmetrics_out_2222c7c65374 
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 67 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-readFile.R:103:3'): reads and formats data correctly ─────────
  Expected `unclass(as.POSIXct(ts, tz = "UTC"))` to be identical to `unclass(exp)`.
  Differences:
    `actual`: 1625312880.0
  `expected`: 1625320080.0
  
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 67 ]
  Error:
  ! Test failures.
  Execution halted

CRAN check page ↗

Slowest check: 1.1 min · r-oldrel-windows-x86_64
Status changes
  • ERROR11 OK, 2 ERRORNow
  • ERROR13 OK, 1 ERROR2026-03-10
Advisories

none known

Documentation

In release 1.0.3
READMEYes · 478 wordsVignettesNoNEWSYes · 100% structured · mentions 1.0.3Citation fileYes · computed when R runs itWebsitenot declared in DESCRIPTION
Help pages
6
Examples that run
50%3 run in a plain check · 2 only when donttest examples are enabled (R CMD check --as-cran) · 1 never run
Exported functions with examples
100%
Documented parameters
93%
Return-value docs
100%
Help pages citing references
0%

Downloads

1.9K
CRAN downloads in the past year
Rank #23,614 · ~5/day · ~155/mo
Daily download trend is not available in this view yet.
19930 days
55290 days
1.9K1 year
Compare downloads with other packages →
Also on71 r2u7 autocran

Repository

4Stars
1Forks
3Open issues
0Open PRs
5Releases
182Commits
1Commit identities
License file reads as LGPL-3.0 · DESCRIPTION declares AGPL (>= 3) · 182 commits · Last activity 2025-11-04 · Default branch at 1.1.0, ahead of CRAN 1.0.3 (checked 2026-10-25)
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
2
Median days to close, 50 most recently updated closed PRs
0
PracticesBeta

3 development-tooling and community-health practices detected across 2 families in the upstream repository

Checks run against github.com/jhmigueles/stepmetrics on 2026-10-25.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Coverage (1)
Coverage reporting
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Codexfirst seen 2025-06-20
    Pull request it wrote: opened by a project member
How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
5 external dependencies (excludes base and recommended)

Installing stepmetrics adds 1 package (0 with compiled code, 2.3 MB of source tarballs). Heaviest: PhysicalActivity 2.3 MB.

Depends (1)
R >= 3.5.0
Imports (4)
PhysicalActivitytoolsstatsutils
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (3)
Author, Maintainer since 1.0.1 (2025)
Funder
Funding and data support
Releases (2)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 1.0.3Latest
    record
    2025-10-01 · current release · diff ↗
  • 1.0.1
    record
    2025-09-16
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2025-09-16
Total releases
2 / 1 yrs
License
AGPL (>= 3) OSI
Minimum R
≥ 3.5.0
Download size
1.7 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("stepmetrics")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for stepmetrics version 1.0.3 [Data set]. HJJB, LLC. Data release v2026-10-26. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy