These helper functions provide a lightweight interface to serialise and
deserialise PhysioExperiment objects to RDS files. They act as placeholders
for richer IO backends that can be developed later.
Value
readPhysio() returns a
PhysioExperiment object.
writePhysio() returns the input object invisibly.
References
Wickham, H. (2014). "Tidy Data." Journal of Statistical Software, 59(10), 1-23. doi:10.18637/jss.v059.i10
Examples
# Create a PhysioExperiment object
pe <- PhysioExperiment(
assays = list(raw = matrix(rnorm(1000), nrow = 100, ncol = 10)),
samplingRate = 256
)
# Write to a temporary file
tmp <- tempfile(fileext = ".rds")
writePhysio(pe, tmp)
# Read it back
pe_loaded <- readPhysio(tmp)
samplingRate(pe_loaded)
#> [1] 256
# Clean up
unlink(tmp)