Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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()
Add Comment
Please, Sign In to add comment