Averaging multiple runs of vertex-wise(CIFTI) data within subject

CIFTI_subj_avg(rds, filename)

Arguments

rds

The filepath of the FSLRvextract-generated .rds file

filename

The filename of the output subject-averaged .rds file

Value

outputs a .rds file containing a matrix where each row represent each subject and each column represent each vertex.

Details

Some fMRI datasets contain multiple runs per subject. Currently XCP-d generates ReHo or ALFF data for these multiple runs without concatenating the runs within a subject. This function averages the vertex-wise data such that each subject will only have one row of cifti data.

Examples

if (FALSE) { # \dontrun{
CIFTI_subj_avg(rds = "COBRE_reho.rds", filename = "averaged/COBRE_reho.rds")
} # }