View source: R/physio_functions.R
splice_physio | R Documentation |
Function to splice an ep.physio object to a section demarcated by start and end codes.
splice_physio(
ep.physio,
start_code = NULL,
end_code = NULL,
other_codes = NULL,
strict = TRUE
)
ep.physio |
An ep.physio object that already contains the $ttl_codes field |
start_code |
The onset TTL code that should be used for the start of splicing |
end_code |
The offset TTL code that should be used to end the splice |
other_codes |
an optional vector of other codes that are allowed between
|
strict |
a boolean indicating whether the function should throw an error if TTL codes
are found within the splice that are not contained in |
## Not run:
#acq_data is an object read in by read_acq and then augmented by
acq_data <- read_acq("~/Downloads/s3_ALL_data_prototype/070_SK_Physio.acq",
acq2hdf5_location = "~/Library/Python/3.7/bin/acq2hdf5")[[1]]
#read in a codes data.frame into codes
acq_data <- augment_ttl_details(acq_data, zero_code = 4, code_labels_df=codes)
#look for physio data between codes 6 and 28, allowing 12, 14, 20, 22 in between
acq_data_reduce <- splice_physio(acq_data, start_code=6, end_code=28, other_codes=c(12, 14, 20, 22))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.