read.ebm: Read data in the Embla Data Format.

Description Usage Arguments Value Examples

Description

This function reads the data stored in an EBM file. This data consists of, e.g., physiologic signals.

Usage

1
2
read.ebm(datapath, channels = NULL, start = 0, data.length = NULL,
  header.only = FALSE)

Arguments

datapath

Either the full path to a directory containing EBM-files or the full path to a particular EBM file. If a directory is given, it is assumed that all these files are from the same recording session

channels

A string or a list of strings with channel names (typically the same name as the EBM file names). If the datapath argument is a directory, these strings are used to filter files from the directory.

start

The offset in seconds from the beginning of the file to start reading data.

data.length

The amount of data in seconds to be read.

header.only

Boolean denoting whether to only read the headers in the EBM file. Default is FALSE.

Value

The data in the EBM file(s) as a list.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
# Read all EBM files in a directory
ebm <- read.ebm("/tmp/datapath")

# Read one particular EBM file
ebm <- read.ebm("/tmp/datapath/ECG.ebm")

# Read some channels
ebm <- read.ebm("/tmp/datapath", channels = c("ECG", "Fz", "Cz"))

# Read 20 seconds of data, starting 10 seconds after the beginning of the file:
ebm <- read.ebm("/tmp/datapath/ECG.ebm", start = 10, data.length = 20)

# Only read the header
ebm <- read.ebm("/tmp/datapath/ECG.ebm", header.only = TRUE)

## End(Not run)

bwrc/embla-r documentation built on May 13, 2019, 9:16 a.m.