View source: R/read.edf.signals.R
| read.edf.signals | R Documentation |
The function reads a selected EDF or EDF+ file. Also resampling can be done (upsampling or downsampling).
read.edf.signals(
file,
resampling = FALSE,
f.new = NULL,
from = NULL,
to = NULL,
verbose = FALSE
)
file |
The path to the EDF / EDF+ file to be read. |
resampling |
If |
f.new |
A new frequency (used for upsampling or downsampling). |
from |
Loading a signal |
to |
Loading a signal |
verbose |
Flag to print out progress information. |
If resampling=TRUE, the frequency of all signals will be upsampled or downsampled,
depending on the actual sampling rate of the individual channels and the set value of the
f.new parameter. The EDF standard assumes that each channel can be sampled at a different
rate. Therefore, it may happen that some channels are upsampled and others are downsampled. The
function does not provide the functionality to independently change the sampling rate for each channel.
A list is returned with:
1) data frame with all signals stored in the given edf file,
2) complete result returned by the edf::read.edf() function,
3) sampling rate of the data after possible resampling (upsampled or downsampled),
4) time stamps of the data after possible resampling (upsampled or downsampled).
file <- system.file("extdata", "EEG.edf", package = "MatchingPursuit")
sigs1 <- read.edf.signals(file, resampling = FALSE)
lapply(sigs1, class)
sigs1$sampling.rate
sigs2 <- read.edf.signals(file, resampling = TRUE, f.new = 128, verbose = TRUE)
lapply(sigs2, class)
sigs2$sampling.rate
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.