sdt_count_steps: Estimate Steps via SDT

View source: R/sdt.R

sdt_count_stepsR Documentation

Estimate Steps via SDT

Description

Estimate Steps via SDT

Usage

sdt_count_steps(
  data,
  sample_rate,
  order = 4L,
  high = 0.25,
  low = 2.5,
  location = c("wrist", "waist"),
  verbose = TRUE
)

Arguments

data

A data.frame with a column for time in POSIXct (usually HEADER_TIMESTAMP), and X, Y, Z

sample_rate

sampling frequency (in Hz)

order

order of bandpass Butterworth filter order

high

highpass threshold for filter

low

lowpass threshold for filter

location

location of the device, which indicates a different threshold for peaks

verbose

print diagnostic messages

Value

A data.frame of timeand steps

Examples

csv_file = system.file("test_data_bout.csv", package = "walking")
if (requireNamespace("readr", quietly = TRUE)) {
  x = readr::read_csv(csv_file)
  colnames(x)[colnames(x) == "UTC time"] = "time"
  res = sdt_count_steps(data = x, sample_rate = 100L)
}

walking documentation built on Aug. 4, 2026, 1:07 a.m.