Skip to contents

This function takes in a solutions matrix and returns a dataframe containing the cluster assignments for each subjectkey. It is similar to 'get_clusters(), which takes one solutions matrix row and returns a vector of cluster assignments' and get_cluster_df(), which takes a solutions matrix with only one row and returns a dataframe with two columns: "cluster" and "subjectkey" (the UID of the observation).

Usage

get_cluster_solutions(solutions_matrix)

Arguments

solutions_matrix

A solutions_matrix.

Value

cluster_solutions A "data.frame" object where each row is an observation and each column (apart from the subjectkey column) indicates the cluster that observation was assigned to for the corresponding solutions matrix row.