Learn R Programming

mpathsenser (version 1.2.3)

unpack_sensor_data: Unpack raw sensor data

Description

This function takes raw sensor data coming from import() and unpacks it into tidy data frames so that it can be written to the database. Note that this function is internal and should not be used for other purposes.

Usage

unpack_sensor_data(data, ...)

Value

A data frame with the sensor data unpacked.

Arguments

data

A data frame containing the raw sensor data.

...

These dots are for future extensions and must be empty.

Examples

Run this code
x <- tibble::tibble(
  study_id = "test-study",
  participant_id = "12345",
  data_format = "cams 1.0.0",
  start_time = "2021-11-14 16:40:00.123456",
  end_time = NULL,
  sensor = "Activity",
  data = list(list(
    confidence = 80,
    type = "WALKING"
  ))
)
class(x) <- c("activity", class(x))
mpathsenser:::unpack_sensor_data(x)

Run the code above in your browser using DataLab