Learn R Programming

ciftiTools (version 0.16.1)

parc_mean_mat: Make parcellation mean matrix

Description

Create a matrix that compute the average value for each parcel.

Usage

parc_mean_mat(parc)

Value

The parcellation matrix

Arguments

parc

A single-column "dlabel" "xifti" object.

Details

From a single-column "dlabel" "xifti" object, make a \(K \times V\) matrix where row \(k\) is a vector corresponding to the kth Key value, with \(1/k_i\) at locations with that key value, and \(0\) elsewhere. \(k_i\) is the total number of locations inside Key \(k\). So, the sum of each row will be \(1\), and each column will only have exactly one non-zero value (because each location only has one Key value) except medial wall locations will have all zeroes.

Multiplying the result of parc_mean_mat with a \(V \times T\) matrix of timeseries data, e.g. from as.matrix(dlabel_xii), will yield the average value for each Key.