| 1 |
#' \name{Biosig} |
| 2 |
#' \title{Loads biomedical signal data} |
| 3 |
#' |
| 4 |
#' \Description{ |
| 5 |
@param filename name of biosig data file |
| 6 |
@return Header (or Meta-) information of data file in JSON format |
| 7 |
jsonHeader <- function(filename) jsonHeader(filename) |
| 8 |
|
| 9 |
@param channel indicates which channel should be loaded, (default 0: indicaes all channels) |
| 10 |
@inheritParams jsonHeader |
| 11 |
@return matrix containing sample values |
| 12 |
sload <- function(filename, channel=0) sload(filename, channel) |
| 13 |
|
| 14 |
Usage: |
| 15 |
# read header information |
| 16 |
library(rjson) |
| 17 |
HDR = fromJSON(jsonHeader("../data/Newtest17-256.bdf")) |
| 18 |
# read data |
| 19 |
data = sload("../data/Newtest17-256.bdf") |
| 20 |
plot((1:nrow(data))/HDR$Samplingrate,data[,1],"l",xlab="time [s]",ylab=HDR$CHANNEL[[1]]$Label) |
| 21 |
#' } |