Easily Handling Data from the ‘m-Path’ Platform

Provides tools for importing and cleaning Experience Sampling Method (ESM) data collected via the 'm-Path' platform. The goal is to provide with a few utility functions to be able to read and perform some common operations in ESM data collected through the 'm-Path' platform (< https://m-path.io/landing/>). Functions include raw data handling, format standardization, and basic data checks, as well as to calculate the response rate in data from ESM studies.


mpathr

R-CMD-check Codecov testcoverage CRANstatus

Overview

The goal of mpathr is to provide with a few utility functions to read and perform some common operations in data from Experience Sampling Methodology (ESM) studies collected through the m-Path platform (https://m-path.io/landing/). The package provides functions to read data from m-Path, and to calculate response rate in data from Experience Sampling studies.

An overview of how to use this package (as well as a video and a detailed guide) can be found in the m-Path manual.

Installation

install.packages("mpathr")
library(mpathr)

Example

This is a basic example which shows you how to read data gathered from m-Path into R using the mpathr package. For this, we use the example data included in the package:

# loads package
library(mpathr)

# find paths to example basic and meta data:
basic_path <- mpath_example(file ='example_basic.csv')
meta_path <- mpath_example(file = 'example_meta.csv')

# read the data
data <- read_mpath(
  file = basic_path,
  meta_data = meta_path
)

print(data)
#> # A tibble: 2,221 × 100
#>   connectionId legacyCode  code       alias initials accountCode scheduledBeepId
#>          <int> <chr>       <chr>      <chr> <chr>    <chr>                 <int>
#> 1       234609 !9v48@jp7a7 !byyo kjyt abc   Ver      jp7a7                    -1
#> 2       234609 !9v48@jp7a7 !byyo kjyt abc   Ver      jp7a7              28626776
#> 3       234609 !9v48@jp7a7 !byyo kjyt abc   Ver      jp7a7              28626777
#> 4       234609 !9v48@jp7a7 !byyo kjyt abc   Ver      jp7a7              28626781
#> 5       234609 !9v48@jp7a7 !byyo kjyt abc   Ver      jp7a7              28626782
#> # ℹ 2,216 more rows
#> # ℹ 93 more variables: sentBeepId <int>, reminderForOriginalSentBeepId <int>,
#> #   questionListName <chr>, questionListLabel <chr>, fromProtocolName <chr>,
#> #   timeStampScheduled <int>, timeStampSent <int>, timeStampStart <int>,
#> #   timeStampStop <int>, originalTimeStampSent <int>, timeZoneOffset <int>,
#> #   deltaUTC <dbl>, consent_yesno_yesno <int>,
#> #   gender_multipleChoice_index <int>, gender_multipleChoice_string <chr>, …

Getting help

If you encounter a clear bug or need help getting a function to run, please file an issue with a minimal reproducible example on Github.

Code of Conduct

Please note that the mpathr project is released with a Contributor Code of Conduct. By contributing to this project you agree to abide by its terms.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("mpathr")

1.0.4 by Merijn Mestdagh, 8 months ago


https://m-path.io, https://github.com/m-path-io/mpathr


Report a bug at https://github.com/m-path-io/mpathr/issues


Browse source code at https://github.com/cran/mpathr


Authors: Merijn Mestdagh [aut, cre] (ORCID: , Lara Navarrete [aut] , Koen Niemeijer [aut] , m-Path Software [cph]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports cli, dplyr, ggplot2, jsonlite, lifecycle, lubridate, readr, rlang, tidyr

Suggests knitr, rmarkdown, spelling, testthat


See at CRAN