Giter Club home page Giter Club logo

impactr's Introduction

impactr

DOI CRAN status R-CMD-check Codecov test coverage Lifecycle: maturing

impactr is a package with functions to read, process and analyse raw accelerometer data related to mechanical loading variables. You can learn more about this package features and how to use it in vignette("impactr").

Installation

To install the latest stable version of impactr from CRAN, run:

install.packages("impactr")

You can also install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("verasls/impactr")

Usage

library(impactr)

read_acc(impactr_example("hip-raw.csv")) |>
 define_region(
    start_time = "2021-04-06 15:45:00",
    end_time = "2021-04-06 15:45:30"
  ) |>
  specify_parameters(
    acc_placement = "hip",
    subj_body_mass = 78
  ) |>
  filter_acc() |>
  use_resultant() |>
  find_peaks(vector = "resultant") |>
  predict_loading(
    outcome = "grf",
    vector = "resultant",
    model = "walking/running"
  )
#> # Start time:              2021-04-06 15:43:00
#> # Sampling frequency:      100Hz
#> # Accelerometer placement: Hip
#> # Subject body mass:       78kg
#> # Filter:                  Butterworth (4th-ord, low-pass, 20Hz)
#> # Data dimensions:         26 × 3
#>    timestamp           resultant_peak_acc resultant_peak_grf
#>    <dttm>                           <dbl>              <dbl>
#>  1 2021-04-06 15:45:00               1.32              1387.
#>  2 2021-04-06 15:45:01               1.36              1392.
#>  3 2021-04-06 15:45:04               1.30              1384.
#>  4 2021-04-06 15:45:04               2.32              1521.
#>  5 2021-04-06 15:45:05               1.50              1412.
#>  6 2021-04-06 15:45:06               1.68              1435.
#>  7 2021-04-06 15:45:06               1.51              1412.
#>  8 2021-04-06 15:45:07               1.96              1473.
#>  9 2021-04-06 15:45:08               1.37              1393.
#> 10 2021-04-06 15:45:08               1.86              1459.
#> # … with 16 more rows

impactr's People

Contributors

verasls avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.