# Create a simple example timeseries with multiple ROIs
set.seed(123)
n_frames <- 100
# Create a data frame with multiple ROIs
timeseries <- data.frame(
subjects = rep(1, n_frames),
run = rep(1, n_frames),
time = seq(0, n_frames-1),
ROI1 = rnorm(n_frames),
ROI2 = rnorm(n_frames),
ROI3 = rnorm(n_frames)
)
# Split the timeseries by all ROI columns
split_data <- split_timeseries(timeseries)
Run the code above in your browser using DataLab