R/extractAllChannels.R

Defines functions extractAllChannels

extractAllChannels <- function(file){
  data <- readStructurized(normalizePath(file, mustWork = T))
  
  ret <- lapply(data$streams, function(si){
    flt <- Filter(
      function(b) identical(SI(b), si) ,
      data$blocks
    )
    if(length(flt)>0){
      do.call(
        DBcombine,
        flt
      )
    } else {
      makeEmpty(si)
    }
  })
  
  names(ret) <- sapply(data$streams, '[[', 'name')
  ret 
}
tz-lom/Resonance.R3 documentation built on July 18, 2019, 3:44 p.m.