Read a Shared Near Infrared Spectroscopy Format file
Value
A PhysioExperiment::PhysioExperiment() with a time-by-measurement
raw assay.
Examples
# \donttest{
# Round-trip through a temporary SNIRF/HDF5 file (needs a .snirf on disk)
pe <- PhysioNIRS:::.nirs_demo_object()
pe <- PhysioExperiment::setEvents(pe, PhysioExperiment::PhysioEvents(
onset = 6, duration = 4, type = "task", value = "1"))
path <- tempfile(fileext = ".snirf")
writeSNIRF(pe, path)
back <- readSNIRF(path)
dim(back)
#> [1] 160 4
unlink(path)
# }