# options
options(width=200)
# Libraries
require(R.matlab)
require(data.table)
osc <- readMat('oscillationDataLCM.mat')
Labelcols <- function(mydata, n) {
strings <- rep(c("T", "S", "O"), n);
digits <- rep(c(1:n), each = 3);
names(mydata) <- paste0(strings, digits);
return(mydata)
}
WithOsc <- osc$signalsWithOscillations
WithOsc <- lapply(WithOsc, unlist, use.names=FALSE)
WithOsc <- as.data.table(WithOsc)
WithoutOsc <- osc$signalsWithoutOscillations
WithoutOsc <- lapply(WithoutOsc, unlist, use.names=FALSE)
WithoutOsc <- as.data.table(WithoutOsc)
WithOsc <- Labelcols(WithOsc, 20)
names(WithOsc)
WithoutOsc <- Labelcols(WithoutOsc, 7)
names(WithoutOsc)