View source: R/physio_functions.R
biopac_hdf5_to_dataframe | R Documentation |
After converting an acq file using acq2hdf5, this function converts the hdf5 file to a data.frame
biopac_hdf5_to_dataframe(
hdf5file,
upsample_to_max = TRUE,
ttl_to_dec = TRUE,
ttl_columns = NULL
)
hdf5file |
HDF5 file containing converted BIOPAC data (using acq2hdf5) |
upsample_to_max |
logical (TRUE/FALSE) indicating whether to upsample slower channels to the sampling
rate of the fastest channel. If |
ttl_to_dec |
logical indicating whether to convert binary digital input channels to decimal TTL (parallel port) codes. These codes are used to synchronize timing between behavioral and physiological data streams. |
ttl_columns |
A numeric vector or character vector indicating which columns within the imported dataset contain the digital inputs that should be converted to decimal TTL codes. If not specified, channels starting with Digital.input will be used. There should be exactly 8 channels for a 1-byte (0-255) TTL code. |
This function uses the data.table package to build the data.frame of physiological data because this package is particularly good at working with large datasets without a lot of copy-in-memory steps that can slow down processing and explode the peak RAM demand.
The function also supports upsampling of all data onto the same time resolution as the fastest
sampling rate for any channel. This is governed by the upsample_to_max
argument
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.