embla
is an R-package for reading physiologic data recorded with an Embla device.
To install the embla
package in R, proceed as follows in R.
First install the devtools
-package and load it:
install.packages("devtools")
library(devtools)
You can now install the embla
package:
install_github("bwrc/embla-r")
Read all all ebm-files in a directory containg multiple signals, one signal per ebm-file:
library(embla)
datapath <- "/tmp/my_recording/"
recording <- read.ebm(datapath)
Read one signal from an ebm-file:
datafile <- "/tmp/ecg.ebm"
recording <- read.ebm(datafil)
Read two signals from a directory directory containg multiple signals, one signal per ebm-file:
datapath <- "/tmp/my_recording/"
recording <- read.ebm(datapath, channels = c("ecg", "Fz", "Pz"))
You can also specify additional arguments to read.ebm
, such as the offset offset in seconds from the beginning of the file where to start reading data and how much data that should be read (using the parameter data.length
).