#' import_flyPAD
#' import flyPAD data from all matlab files in a folder
#'
#' @param path path containing .mat files
#'
#' @return a list with elements being one lists per individual experiment
#' @export
#'
#' @examples
#'
import_flyPAD <- function(path) {
files <- dir(path = path, pattern = "*.mat")
if (length(files) == 0) stop(c("no *.mat files found at ", path))
result <- list()
for(i in files) {
tmp <- import_flyPAD_rawdata(paste0(path,i))
experiment <- paste(tmp$date, tmp$time, sep = "_")
result[[experiment]] <- tmp
rm(tmp)
message(experiment, " imported...")
}
return(result)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.