readData: Reading data from zdevice

Description Usage Arguments Value Examples

View source: R/readData.R

Description

Reading data from zdevice

Usage

1
readData(filename, sound_rate = 256, accel_rate = 10, test_grep = F)

Arguments

filename

A string with the path to the data file

sound_rate

Sampling rate for sound data (default = 256)

accel_rate

Sampling rate for motion data (default = 10)

Value

A list with 3 components:

  1. timestamp: The timestamp when the recording was started

  2. Sound: A data.frame with time and sound data

  3. Motion: A data.frame with time and motion data (x, y, and z axes)

Examples

1
2
3
4
dat <- readData(system.file('extdata','example_data.txt', package='zdeviceR'))
sound_data <- dat[['Sound']]
motion_data <- dat[['Motion']]
start_time <- dat[['timestamp']]

Zansors/zdeviceR documentation built on Dec. 25, 2019, 12:23 a.m.