This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install fnirsr | |
devtools::install_github("erzk/fnirsr") | |
library(dplyr) | |
library(fnirsr) | |
# file path | |
p01_path <- "/media/.../p01_fnirs_data_MES_Probe1.csv" # MES file | |
# load the header | |
header <- load_ETG4000_header(p01_path) | |
# load the file | |
df <- load_ETG4000_data(p01_path, header) | |
# trim down to facilitate the demo | |
df <- df[1:2500,] | |
# overview | |
str(df) | |
# block borders | |
all_borders <- which(df$Mark != 0) | |
# plot the signal | |
plot(df$CH1.703.6., type = "l", ylab = "Intensity") | |
abline(v = all_borders, col = "red") | |
# overview of Marks | |
df %>% dplyr::filter(Mark != 0) %>% select(Mark) %>% table() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment