Skip to content
Codes and results for MIMS-unit algorithm
PostScript HTML R
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
R
data-raw
data
inst
man
renv
reproduce
tests
vignettes
.Rbuildignore
.Rprofile
.gitignore
.renvignore
DESCRIPTION
LICENSE
LICENSE.md
MIMSunit.Rproj
NAMESPACE
NEWS.md
README.md
README.rmd
_pkgdown.yml
codecov.yml
cran-comments.md
mims-unit.R
renv.lock

README.md

MIMS-unit algorithm

CRAN Status Pkgdown .github/workflows/test.yml

Please create github issues if you have any question related to the package.

Short introduction

MIMS-unit is abbreviated for Monitor Independent Movement Summary unit. This measurement is developed to harmonize the processing of accelerometer data from different devices. You may refer to the manuscript for the detail description of the algorithm.

Copyright and citation

The copyright of the work belongs to Northeastern University, mHealth Research Group. Please kindly cite the manuscript if you have used the package or referred to the algorithm in your work.

System Requirements

  1. R (>= 3.6.0)
  2. memory (> 4GB)

For Windows

Rtools 3.5 (see: https://cran.r-project.org/bin/windows/Rtools/)

For Linux (use ubuntu as an example)

Install dependency system packages for devtools: build-essential, libcurl4-gnutls-dev, libxml2-dev, libssl-dev.

Installation

Stable version

CRAN

install.packages('MIMSunit')

Osler in health

source("https://oslerinhealth.org/oslerLite.R")
osler_install('MIMSunit')

Development version

Github

install.packages("devtools")
devtools::install_github("mhealthgroup/MIMSunit")

Note: It is recommended to use Rstudio when installing the package, because devtools has some compatible issues with R command line interface.

Usage

MIMSunit::mims_unit(input_dataframe, dynamic_range=c(-3,3), epoch='1 min')

Assume the input dataframe is in following format, with the first column (timestamp) in POSXlct objects and the device used to collect this data has dynamic range being -3g to 3g. You may set the epoch length to be 1 min, 1 sec, 5 sec, 10 sec and so on.

HEADER_TIME_STAMP,X,Y,Z
2016-10-03 14:51:14.236,0.007,-0.005,0.984
2016-10-03 14:51:14.256,0.008,-0.007,0.981
2016-10-03 14:51:14.276,0.009,-0.006,0.978
2016-10-03 14:51:14.297,0.009,-0.007,0.984
2016-10-03 14:51:14.317,0.010,-0.010,0.982
2016-10-03 14:51:14.337,0.011,-0.010,0.982
You can’t perform that action at this time.