Commit 16917995 authored by Paul Bouchequet's avatar Paul Bouchequet

up

parent 683b63f9
......@@ -13,4 +13,22 @@ for (i in c(1:100)){
download.file(url = url,destfile = filePath)
system(paste0("unrar x ",filePath," ",target))
}
}
binTarget <- "data/bin/"
for (i in c(1:100)){
recPath <- paste0(target,i,"/",i,".rec")
headers <- edfReader::readEdfHeader(recPath)
if ("C3-M2" %in% headers$sHeaders$label){
dirPath <- paste0(binTarget,i)
unlink(dirPath, recursive=TRUE)
dir.create(dirPath)
record <- edfReader::readEdfSignals(headers,
signals = c("C3-M2"))
sigPath <- paste0(dirPath,"/C3-M2")
dir.create(sigPath)
sigFile <- paste0(sigPath,"/data.bin")
writeBin(record$signal, con = sigFile, size = 4)
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment