restructure_as_list: Restructure Data Matrix as List
Description
This function restructures neighborhood information given by a data matrix
containing all information and one neighborhood assignment vector. It returns a list
of data matrices used in ssMRCD.
Usage
restructure_as_list(data, groups)
Value
Returns a list containing the observations per neighborhood assignment.
The list is sorted according to the order of the first appearance in the groups vector.