# NOT RUN {
library(adeptdata)
library(dplyr)
library(adept)
xyz <-
adeptdata::acc_walking_IU %>%
filter(loc_id == "left_wrist", subj_id == "id86237981") %>%
arrange(time_s) %>%
select(v1 = x, v2 = y, v3 = z) %>%
as.matrix()
# define raw accelerometry data sample frequency
xyz.fs <- 100
# define template list based on predefined templates
template_mat <- adeptdata::stride_template$left_wrist[[3]]
template <- list(
template_mat[1, ],
template_mat[2, ],
template_mat[3, ]
)
# run walking segmentation
# (parallel supported, except for Windows; see run.parallel, run.parallel.cores args)
segmentWalking(xyz, xyz.fs, template)
# }
Run the code above in your browser using DataLab