View source: R/read.csv.signals.R
| read.csv.signals | R Documentation |
Reads and checks if the csv file has the correct structure
read.csv.signals(file, col.names = NULL)
file |
File to be read and check. The first line of the file must contain two numbers:
the sampling rate in Hz ( |
col.names |
Vector with column names. If not specified, default names will be created. |
A list is returned with: 1) data frame where rows = samples for all channels, columns = channels, 2) sampling rate.
file <- system.file("extdata", "sample1.csv", package = "MatchingPursuit")
# The first line of the file must contain two numbers:
# a) the sampling rate in Hz
# b) the signal length in seconds
out <- read.csv(file, header = FALSE)
head(out)
signal <- read.csv.signals(file, col.names = "signal_1")
head(signal$signal)
signal$sampling.rate
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.