# Create a NeuroSpace object
vspace <- NeuroSpace(dim = c(5, 5, 5, 10), spacing = c(1, 1, 1))
# Define voxel coordinates for the ROI
coords <- matrix(c(1, 2, 3, 2, 2, 2, 3, 3, 3), ncol = 3)
# Create a data matrix for the ROI
data <- matrix(rnorm(30), nrow = 10, ncol = 3)
# Create a ROIVec object
roi_vec <- ROIVec(vspace, coords, data)
Run the code above in your browser using DataLab