knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

If you are here to learn about the weheaR package, it would be good to load it ;-)

library(weheaR)

Audio files

Files from the inertial sensor (accelerometer and magnetometer)

Let's load a .DAT file coming from the magnetometer:

mag_dat_file <- system.file("extdata", "MAG_050721_213235.DAT", package = "weheaR")

Now we can convert it:

# First, replace tempdir() below with the path of a directory
# where you want to write the converted file
temp_dir <- tempdir()

convert_dat(filenames="MAG_050721_213235.DAT",
            file_type="rds",
            dir_in=system.file("extdata", package = "weheaR"),
            dir_out=temp_dir,
            tz=+2)


schamaille/weheaR documentation built on June 5, 2022, 11:25 p.m.